IRoute.templateUrl also now accepts a function instead of a string.

Adjusted templateUrl of IRoute because $routeProvider now allows function templateUrls to be defined such as;

        .when("/:controller/:action", { 
            templateUrl: function ($routeParams) {
                console.log("Default rule");
                return '/ng/app/views/partials/' + $routeParams.action.toLowerCase() + '.htm';
            }
        })
This commit is contained in:
danieljsinclair
2013-08-01 18:12:31 +01:00
parent ac5577e72e
commit f711d046d5

View File

@@ -622,7 +622,7 @@ declare module ng {
interface IRoute {
controller?: any;
template?: string;
templateUrl?: string;
templateUrl?: any;
resolve?: any;
redirectTo?: any;
reloadOnSearch?: boolean;