Imagine an application has a List page, such as a table showing a list of users. There is a button on each row of the table called \"Edit\", and when this is clicked, a righ
Your url must reflect the state mode using querystring: /stuff/1?edit
or /stuff/1
that stands for /stuff/1?view
You could use reloadOnSearch=false
to instruct AngularJS not to reload the view:
http://docs.angularjs.org/api/ngRoute.$routeProvider
Inside your controller
, check the state mode (view
or edit
) using $routeParams
. Catch the edit click event, pass your model to your bar and toggle its visibility accordingly.
See those interesting links:
Can you change a path without reloading the controller in AngularJS?
Updating URL in Angular JS without re-rendering view