ngView (directive in module ng )

Description

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.

Usage

as element (see IE restrictions)
<ng-view>
</ng-view>
as attribute
<ANY ng-view>
   ...
</ANY>
as class
<ANY class="ng-view">
   ...
</ANY>

Directive info

  • This directive creates new scope.

Events

Example

Source











Demo