I have a pagination system that retrieves items from a JSON file. The items can be added or removed. I want to create a link for each item that leads to a configuration view (each item should have its own unique configuration). I am seeking the best way to achieve this using ui.router
. Below is my current routing setup :
app.js :
app.config(function ($stateProvider) {
$stateProvider.state("itemslist", {
url:"/itemslist",
views: {
'launcher':{
controller:"ItemsListCtrl",
templateUrl:"ItemsList.html"
}
}
})
...
}
And here's the HTML code :
ItemList.html :
<ul>
<li ng-repeat="item in listItem">
<b>{{item.text}} -</b>
<button ui-sref="dynamic state">CONFIG.</button>
</li>
</ul>
In this example, the 'dynamic state' could be something like "config?item.id". How would the routing function in such a scenario ? Is it feasible to implement this way?