- directive in module ngRoute
Overview
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 $route
service.
Requires the ngRoute
module to be installed.
Directive Info
- This directive creates new scope.
- This directive executes at priority level 400.
Usage
- as element: (This directive can be used as custom element, but be aware of IE restrictions). 12345
<
ng-view
[
onload
=
"string"
]
[
autoscroll
=
"string"
]>
...
</
ng-view
>
- as attribute: 12345
<
ANY
[
onload
=
"string"
]
[
autoscroll
=
"string"
]>
...
</
ANY
>
- as CSS class: 1
<
ANY
class
=
"[onload: string;] [autoscroll: string;]"
> ... </
ANY
>
Animations
Animation | Occurs |
---|---|
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.Arguments
Param | Type | Details | ||
---|---|---|---|---|
onload (optional) | string | Expression to evaluate whenever the view updates. | ||
autoscroll (optional) | string | Whether
|
Events
-
$viewContentLoaded
Emitted every time the ngView content is reloaded.
Type:
emitTarget:
the current ngView scope
Please login to continue.