AngularJS Question:
Download Questions PDF

How to initiate variable in AngularJS?

Answer:

1 <div ng-app="" ng-init="quantity=10;cost=5">
2 <b>Total Cost: {{ quantity * cost }}</b>
3 </div>

Download AngularJS Interview Questions And Answers PDF

Previous QuestionNext Question
What is Data Binding in Angular JS?Does Angular use the jQuery library?