So I have a a custom directive, named e.g custom as below:
app.directive('custom', function()
{
return {
restrict: 'A',
scope: { itemSelector: '=custom', gutter: '=' },
link: function(scope, element, attrs){
console.log("IS: " + scope.itemSelector);
console.log("GUTTER: " + scope.gutter);
}
}
}
invoked via HTML like the below
<div custom="item" gutter="10"><!--content--></div>
Can anyone suggest why scope.gutter === '10' yet scope.itemSelector === undefined?
Is it possible to obtain the value of the directives defining attribute this way?
Thanks
iteman object defined on the scope?scope.itemSelector === "item". Fiddle to come@.scope:{itemSelector:'@custom'}