angularAMD
angularAMD copied to clipboard
Add ui-router/restangular example on webpage/readme
ui-router/restangular seems to be popular with community.
Just tested your module in my seed project with ui-router (thx for great work btw).
As for ui-router, it's basically the same, just different service names, defining states instead of "routes" and it seems you need to specify url
attribute. E.g.:
app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/view1');
$stateProvider
.state('view1', angularAMD.route({
url: '/view1',
templateUrl: 'partials/partial1.html',
controller: 'View1',
controllerUrl: 'controllers/view1.ctrl'
})
)
.state('view2', angularAMD.route({
url: '/view2',
templateUrl: 'partials/partial2.html',
controller: 'View2',
controllerUrl: 'controllers/view2.ctrl'
})
);
}]);
For further and more complex states routing, one should refer to ui-router docs. :)