I'm trying to implement a 2 level hierarchy using directives in Angular. The first scope venture gets passed an JSON array of ventures. In every venture there is an array of positions. The second scope ideally pick up this position object and fill it in.
app.directive('venture',function(){
return {
restrict: "E",
template: '<div><div ng-show="!ventureshow">{{details.venture_name}}'
+'<positions data="{{details.positions}}" ></positions>'
+'...',
scope: {
details:'='
},
replace: true,
link:function($scope, element, attrs){
}
}
});
app.directive('positions',function(){
return {
restrict: "E",
template:'d<ul ng-repeat="position in details">{{position}}<li>{{position.position_name}}:{{position.position_description}}</li></ul>',
scope:{
data:'='
}
}
})
However the equal (=) symbol on the second object causes an error $parse:syntax. Can't seem to figure out what's causing the issue