Answer the question
In order to leave comments, you need to log in
I need to open a modal window in a separate route, how to implement it??
There is a news feed (.../news)
When you click on a post, a modal window opens (I used to do this - .../news?id={post ID}, but now there is a need to create a separate route .../news/{ post id}).
I do everything on ng-route with html5Mode enabled.
When you click on a direct link, not a modal window will open, but just a page with this product.
Need your advice
Answer the question
In order to leave comments, you need to log in
1) add another route /news/{id}
2) add a new controller with a view for the new route
3) call a dialog in ngInit in the controller. (there will be a new page in the background of the dialog)
Nested views are in @angular/router, but you need to demolish ngroute and install a new router (tweak routes for it), place a nested route with zero width height in the news list template, do the steps above, then there will be a new route and there will be news against the background of the dialogue
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question