I am in the progress of making an angularjs app with a c# web api.
I have controller A and B.
In controller A, i have a list of objects, when i click Add (between 2 list items), i get to controller B.
//add item
$location.path("/controllerB")
Inside controller B i am prestented with another list of objects, when i select, i need the selected item, to appear in Controller A's list, at the sepcified index.
My approach so far:
Localstorage: I use localStorage to store the selected object, so its accessible from Controller A, but then i also need the index, and if i store that in LS to access from Controller B, im headed down a path of bad decisions i feel :D
So my best guess so far:
1. Save index from controller A in local storage. (go to B)
2. Save selectedItem from controller B in local storage. (go to A)
3. Push selectedItem to Index.
So please, point me in the angular direction.