Frage

In the tutorials that I have read so far, they all recommend putting ng-app as an attribute to the <body> tag, thus identifying that the entire body is part of the template managed by AngularDart. I was surprised to come across an AngularDart app without an ng-app attribute and yet it is still working. How is this?

War es hilfreich?

Lösung

The angular library ngBootstrap Dartdoc says that:

the root HTML element is used

When no ng-app attribute is present. (Fine print: note that ngBootstrap element and selector parameters can affect the choice of root element -- but these parameters have not been used in the elementary examples I have seen so far. In any case, see the Dartdoc for the full details.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top