I’m here for a little question about angularJS…
Currently at work we are working on an app that need an “overlay” admin style panel.
Lets take this exemple :
http://olivierbossel.com/others/angularJS-overlay.jpg
In the first part, the url is “myapp.com/#/works”. To display this I have currently configured my $routeProvider.when(‘/works’, { templateUrl: … etc… And I have in my template the ng-view directive that handle the load and the display of the template. Ok for this part…
My question is :
How to display a content in another part of the page like in the second part of the picture where the url is “myapp.com/#/admin” ?
In this case, the admin template has to be displayed in an overlay style element…
Hope somebody has an answer for me, that will be extremely helpfull…
Thanks in advance !
See you !
Best regard
Olivier
Take a look at http://angular-ui.github.com/#directives-modal. It basically shows/hides the modal depending on an ng-model variable.
Edit: Here’s an example doing what you want: Open a modal on the same page depending on the routeParams: http://plnkr.co/edit/DOPmBT?p=preview