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?

有帮助吗?

解决方案

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.)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top