You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
See the $routeProvider config.
.when('/Feedback/Details/:id', { templateUrl: '/Feedback/Details/:id', controller: "TestRoute" })
I need to set id with template url dynamically. Is there any option? I do not want to do any Hack like creating a controller and set routeProvider or using ng-include.
Bellow is a option what we can think for parseRoute method. But i do not want to touch the library code.
function parseRoute() {
// Match a route
var params, match;
forEach(routes, function (route, path) {
if (!match && (params = switchRouteMatcher($location.path(), path))) {
match = inherit(route, {
params: extend({}, $location.search(), params),
pathParams: params
});
if ((route.templateUrl) && (/:/.test(route.templateUrl))) {
match.templateUrl = interpolate(route.templateUrl, params);
}
//remove cached template if params were substituted (rely on browser cache)
if (match.templateUrl != route.templateUrl) {
match.template = undefined;
}
match.$route = route;
}
});
// No route matched; fallback to "otherwise" route
return match || routes[null] && inherit(routes[null], { params: {}, pathParams: {} });
}
The text was updated successfully, but these errors were encountered:
Hi
See the $routeProvider config.
.when('/Feedback/Details/:id', { templateUrl: '/Feedback/Details/:id', controller: "TestRoute" })
I need to set id with template url dynamically. Is there any option? I do not want to do any Hack like creating a controller and set routeProvider or using ng-include.
Bellow is a option what we can think for parseRoute method. But i do not want to touch the library code.
function parseRoute() {
// Match a route
var params, match;
forEach(routes, function (route, path) {
if (!match && (params = switchRouteMatcher($location.path(), path))) {
match = inherit(route, {
params: extend({}, $location.search(), params),
pathParams: params
});
The text was updated successfully, but these errors were encountered: