angular-cn/aio/content/examples/upgrade-phonecat-3-router/app/app.config.ts

17 lines
471 B
TypeScript

'use strict';
angular.
module('phonecatApp').
config(['$locationProvider', '$routeProvider',
function config($locationProvider: angular.ILocationProvider,
$routeProvider: angular.route.IRouteProvider) {
$locationProvider.hashPrefix('!');
// #docregion ajs-routes
$routeProvider
.when('/phones/:phoneId', {
template: '<phone-detail></phone-detail>'
});
// #enddocregion ajs-routes
}
]);