I'm using the nested and named views of ui-router.
What I want to achieve is to be able to pass a data from the div that invokes a template to the template itself.
Something like this:
<div ui-view="inputtext" data-value="0"></div>
<div ui-view="inputtext" data-value="1"></div>
<div ui-view="inputtext" data-value="2"></div>
Use the same template in all cases but passing a different value to each one.
That's what the states would be like:
.state('project', {
url: "/project/:projectId",
views: {
'project' : {
templateUrl: "templates/project.html"
},
'group@project' : {
templateUrl: "templates/group.html"
},
'task-1@project' : {
templateUrl: "templates/task-1.html"
},
'inputtext@project' : {
templateUrl: "templates/modules/inputtext.html"
}
}
Within 'project' there are several 'group', within 'group' there are several 'tasks' and within task it is that I want to show several inputtext but with different values.