ngView is a directive that complements the $route service by including the rendered template of the current route into the main layout (
index.html) file. Every time the current route changes, the included view changes with it according to the configuration of the
ngRoute module to be installed.
<ng-view [onload="string"] [autoscroll="string"]> ... </ng-view>
<ANY ng-view [onload="string"] [autoscroll="string"]> ... </ANY>
<ANY class="ng-view [onload: string;] [autoscroll: string;]"> ... </ANY>
| onload |
| || |
Expression to evaluate whenever the view updates.
| autoscroll |
| || |
- If the attribute is not set, disable scrolling. - If the attribute is set without value, enable scrolling. - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated as an expression yields a truthy value.
Emitted every time the ngView content is reloaded.
|enter||when the new element is inserted to the DOM|
|leave||when the old element is removed from to the DOM|
The enter and leave animation occur concurrently.Click here to learn more about the steps involved in the animation.
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.