-
Notifications
You must be signed in to change notification settings - Fork 9
Route provider legacy support
Jens Melgaard edited this page Jul 29, 2013
·
3 revisions
As stated under the basic configuration, the new $routeProvider
ships with a legacy module
that enables the old style routing and use of ng-view
.
Simply load the ui.routing.legacy
module as well
angular.module('phonecat', ['dotjem.routing', 'dotjem.routing.legacy']).
config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/phones', {
templateUrl: 'partials/phone-list.html',
controller: PhoneListCtrl})
.when('/phones/:phoneId', {
templateUrl: 'partials/phone-detail.html',
controller: PhoneDetailCtrl})
.otherwise({redirectTo: '/phones'});
}]);
This should enable big existing web-applications to migrate a bit at a time.
- Route Provider
- Basic Configuration
- Parameters and Converters
- Decorators
- Case Sensitivity
- A Word on Trailing Slashes
- Legacy Support
- State Provider
- Basic Configuration
- Hierarchy Configuration
- Views
- Routes
- Transitions
- Resolve
- State Service
- Transition Provider
- Basic Configuration
- Stage Handlers
- Targeting Multiple States
- View Provider
- Updating Views
- Transactions
- Scroll Provider