angularjs - How to design overlaying views in Angular.js? -
my app using angular
, ui-router
. there 2 pages, first page (state : "book") shows categories , book list. book item clicked, page switch book detail(state: "bookdetail").
however, when switch book list, reload view , not preserve scroll , other stuff.
in opinion, relation of book list , book detail more relation of content , modal, not parallel views. find hard understand modal in ui-router
state system, because modal not navigating specific view, rather overlaying it.
any solution operating views modal , routerizing state
?
$stateprovider.when('booklist',{ url : '/booklist', ... }).when('booklist.bookdetail',{ url : '/bookdetail/{bookid}' }).when('booklist.buybook',{ url : '/bookdetail/{bookid}' ... })
as above, child views should overlay parent view, , removed when url goes back.
Comments
Post a Comment