I am using angular ui router 0.2.15 and there is one page /profile and now want to edit the profile on click of button and url become /profile/edit.
Now I was bit confused between named views and nested view concept of UI router and tried with both of them but issue remains .
using nested state
.state("profile", { url: '/profile', controller: 'UserController', controllerAs: 'vm', templateUrl: 'app/views/user/profile.html', data: { requiresAuth: true, pageTitle: 'Profile' } }) .state("edit", { url: '/edit', parent:'profile', templateUrl: 'app/views/user/edit_profile.html', data: { requiresAuth: true, pageTitle: 'Edit Profile' } })
and profile.html
<div ui-view=""></div>
<button type="button" class="btn fa fa-pencil" ui-sref="edit"></button>
in this case my issue is when I click on edit page, it also show the content of parent view too. How to handle this?