In AngularJS there is an attribute for directives (and others) to specify if it can be instantiated by an element name or an attribute - like restrict:EA
for element AND attribute.
The file angular.dart / lib / directive / ng_a.dart contains a comment * @restrict E
which indicates the directive is for the <A> element
.
Is restrict
not necessary in Angular.dart?
What is the replacement?
Correct, Angular.dart doesn't have
restrict
, so please disregard the comment in ng_a.dart, it's probably just a copy-paste from JS version. All directives/components/controllers useselector
, so you normally need to be very specific. If you need an equivalent ofrestrict:EA
, you could apply two annotations on the class. Ex: