i399exng1ts/app/route.conf.ts
2017-05-17 18:36:09 +03:00

22 lines
559 B
TypeScript

import { ILocationProvider } from 'angular';
routeConf.$inject = ['$routeProvider', '$locationProvider'];
function routeConf($routeProvider: any,
$locationProvider: any) {
$routeProvider.when('/list', {
templateUrl : 'app/list.html',
controller : 'ListCtrl',
controllerAs : 'vm'
}).when('/new', {
templateUrl : 'app/add.html',
controller : 'AddCtrl',
controllerAs : 'vm'
}).otherwise('/list');
$locationProvider.hashPrefix('');
}
angular.module('app').config(routeConf);