Skip to content
Isa Iminov edited this page Apr 9, 2015 · 2 revisions

How would one implement the following angular route in the context of TypeScript ?

And where would be the best place to place this ?

Example of angular route:

angular.module('App', ['ngRoute']).config(['$routeProvider', function ($routeProvider) {
$routeProvider.when("/Main", {
controller: "MainCtl",
templateUrl: "/Views/Main.ascx",
}).when("/DoSomething", {
controller: "doSomethingCtl",
templateUrl: "/Views/DoSometing.ascx",
}).otherwise({ redirectTo: "/Main" });
}]);

Example of TS route:

Clone this wiki locally