angularjs - master Detail with ui-router of angular -


i new angular , looking example of master detail. found one: http://embed.plnkr.co/dbsbiv/app.js, using angular's ngroute. heard ui.route state of art kind of way handle routing due more flexible.

i want have both master , detail on 1 template, tried solve multiple named views in https://github.com/angular-ui/ui-router/wiki/multiple-named-views. have problem, don't know how create link in master list detail view .. tried ... don't know put right here, because have 1 state multiple views.

can tell me whether i'm on wrong way or put ref link detail?

thanks in advance markus

you don't need named views this. nested views. lets imagine have list of blog posts. have 1 state called blogs. , state called blogs.edit, takes parameter of postid.

your blogs.html (the master list) this:

<a ng-repeat="post in blog.posts" ui-sref="blogs.edit({postid: post.id})">{{post.title}}</a>  <div ui-view></div> 

this render list of anchor tags, , nested details view under.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -