The
ng-view is a placeholder directive
defined on the main page, it indicates that this div/panel will be replaced
with different views at run-time based on the routing defined on the page URL.
We shall see detailed implementation of the ng-view directive in the later posts when we look into Routing feature in AngularJS, for now below is the syntax for using ng-view directive.
<div ng-view=""></div>
<ng-view></ng-view>
We shall see detailed implementation of the ng-view directive in the later posts when we look into Routing feature in AngularJS, for now below is the syntax for using ng-view directive.
<div ng-view=""></div>
<ng-view></ng-view>
As
we see above ng-view directive can
be represented as a tag or added as an attribute to the div tag. At runtime the
content of this div/panel will be replaced with content from the current Route.
No comments:
Post a Comment