7
rated 0 times
[
14]
[
7]
/ answers: 1 / hits: 20131
/ 11 Years ago, sun, january 12, 2014, 12:00:00
I created two directives:
directivesModule.directive(capital, function () {
return {
scope: {
capital: @
},
link: function () {}
}
})
directivesModule.directive(country, function () {
return {
scope: {
country: @
},
link: function () {}
}
})
Next, I use them in the same element:
<div country=Russia capital=Moscow></div>
As a result, I get an error: Error: [$compile:multidir] Multiple directives [capital, country] asking for new/isolated scope on: <div country=Russia capital=Moscow>
How do I get the attribute values without scope?
These directives will not necessarily be used in conjunction.
More From » angularjs