Created
July 21, 2016 17:12
-
-
Save OswaldoMartinezMendez/ee492b44fe09049168d244024233bbe3 to your computer and use it in GitHub Desktop.
Example Route in AngularJs 1.X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.config(function ($routeProvider) { | |
$routeProvider.when('/', { | |
templateUrl: 'templates/order.tmpl.html', | |
controller: 'orderController', | |
controllerAs: 'order' | |
}); | |
$routeProvider.otherwise({redirectTo: '/'}); | |
$routeProvider.when('/status', { | |
templateUrl: 'templates/status.tmpl.html', | |
controller: 'statusController', | |
controllerAs: 'status' | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment