I have a scenario were I am creating a page that should be editable. On click of an edit button, property names should change to textboxes (or datepicker, etc depending on the 'type' of the property).
Now I want this to update the url to '/edit', however I do not actually require a page transition. As the controller and view will stay the same but a boolean property, editMode
, will be set to true and thus the input fields will become visible.
Can I create a nested state in the $stateProvider
for this? Is a nested state even necessary here? I think it is because while a page transition is not necessary editMode
is still a state (P.s. I love routing when thinking about it in terms of states!).
How can I achieve this with the ui router?
Thanks.
Test fiddle for the form: No page transition. Just toggling of form fields.