5 ms·
A single element cannot have more than once isolated scope. It only makes sense to use an isolated scope when a directive has a template associated with it. Oth
by mortalapeman 13y ago
A single element cannot have more than once isolated scope. It only makes sense to use an isolated scope when a directive has a template associated with it. Otherwise, one should rely on the $parse + the "attrs" object + $scope.$watch to correctly handle expressions.
- embwbam 13y agoThat seems strange. What happens if two attribute directives ask for an isolate scope? Does it give them the same one, or just fail? I used isolate scopes in the article because I thought they were easier to understand, but I'm thinking of updating it.
- embwbam 13y agoAfter looking into it, angular seems to throw an error if two directives ask for an isolate scope.