Trending News
Home / Web Development / Angular Js / AngularJS – Views

AngularJS – Views

Via multiple views on a single page the angularjs supports single page application. To do this AngularJS has provided ng-view and ng-template directives and $routeProvider services.

ng-view

ng-view tag simply creates a place holder where a corresponding view (html or ng-template view) can be placed based on the configuration.The ng-view is the directive that angular uses as a container to switch between views. Let’s start by making an empty ng-view tag in our app

Usage

ng-template

The ng-template directive is helps to create an html view using script tag. <ng-template> gives you a lot of results relating to the html5 <template> tag.

AngularJS ng-template Directive Syntax

Loading Facebook Comments ...
Social Media Auto Publish Powered By : XYZScripts.com