AngularUI Router
See original GitHub issueIs it possible to use angularAMD with AngularUI Router? The routing in ui-router being done with $stateProvider
and $urlRouterProvider
(for default route).
Issue Analytics
- State:
- Created 10 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
UI-Router for AngularJS (1.x)
UI -Router is the defacto standard for routing in AngularJS. Influenced by the core angular router $route and the Ember Router, UI-Router has ......
Read more >angular-ui/ui-router: The de-facto solution to flexible ... - GitHub
Angular UI-Router is a client-side Single Page Application routing framework for AngularJS. Routing frameworks for SPAs update the browser's URL as the user ......
Read more >angular-ui-router - npm
State-based routing for AngularJS 1.x. Latest version: 1.0.30, last published: a year ago. Start using angular-ui-router in your project by ...
Read more >Routing in Angular JS using Angular UI Router - GeeksforGeeks
Angular -UI-Router is an AngularJS module used to create routes for AngularJS applications. Routes are an important part of ...
Read more >angular-ui-router - Libraries - cdnjs - The #1 free and open ...
State-based routing for AngularJS - Simple. Fast. Reliable. Content delivery at its finest. cdnjs is a free and open-source CDN service trusted by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If all you are looking for is to load controller using RequireJS syntax (i.e.: not on-demand loading), here is what you can do: https://github.com/angular-ui/ui-router/issues/479
On-demand loading should also be possible as ui-router also have a
resolve
property: https://github.com/angular-ui/ui-router/wiki#resolveYou should be able to do something like:
As I do not use ui-router, I am not sure if that actually works. If you setup a simple plunker with ui-router, I can try to wire angularAMD in. Here is a very simple angularAMD plunker as an example: http://plnkr.co/edit/Pco6T6gVEEcp8IcWb4LX
Hi,
i’m trying to use ui-router multiple views in this way:
.state('main', { url:'/app', // abstract: true, data: {requireLogin:true }, views:{ '': angularAMD.route({ templateUrl:function (){ var token=$cookies.get('token'); return '/getTemplate/'+token+'/main'; }, controller:'' }), 'main.content@main': angularAMD.route({ templateUrl:function (){ console.log("main.content template"); var token=$cookies.get('token'); return '/getTemplate/'+token+'/main.content'; }, controller:'main.content', controllerUrl:function (){ console.log("main.content controller");var token=$cookies.get('token'); return '/getController/'+token+'/main.content.js'; }//'main.content' }),
but it seems not to work… what i’m doing wrong?
Thanks, Riccardo