Reputation: 3158
I'd like to know whether it is possible with angular 1.x or not.
The constraint is to have an application compatible with mobile and desktop. On each page of the application, there is a ui-view that displays the usual content, eg.
<div ui-view flex></div>
But for desktop only browsers, there is another ui-view with additional content (it benefits from a larger width), eg.
<div ui-view="desktop-only" hide show-gt-sm></div>
My question is: when a URL is entered, is it possible to open a different state in each ui-view? (currently, the desktop ui-view is fixed) Maybe be defining specific routes for this ui-view?
Upvotes: 0
Views: 37
Reputation: 3158
I finally made it work using:
https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views
For each state, you can handle multiple named views, each view being related to a controller.
Upvotes: 0