top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are Templates in AngularJS?

0 votes
283 views
What are Templates in AngularJS?
posted Oct 20, 2017 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

AngularJS templates are just plain old HTML that contains Angular-specific elements and attributes.
AngularJS used these templates to show information from the model and controller.
Creating an AngularJS template

<html ng-app>
<!-- body tag with ngController directive -->
<body ng-controller="MyController">
 <input ng-model="txtName" value="shailendra"/>
<!-- button tag with ng-click directive & string expression 'btnText' wrapped in "{{ }}"
markup -->
 <button ng-click="changeName()">{{btnText}}</button>
<script src="angular.js">
</body>
</html>
answer Oct 20, 2017 by Shivaranjini
...