आपकी ऑफलाइन सहायता

BACK
49

सी प्रोग्रामिंग

149

पाइथन प्रोग्रामिंग

49

सी प्लस प्लस

99

जावा प्रोग्रामिंग

149

जावास्क्रिप्ट

49

एंगुलर जे.एस.

69

पी.एच.पी.
माय एस.क्यू.एल.

99

एस.क्यू.एल.

Free

एच.टी.एम.एल.

99

सी.एस.एस.

149

आर प्रोग्रामिंग

39

जे.एस.पी.





डाउनलोड पी.डी.एफ. ई-बुक्स
AJS - Directives ng-app

ng-app directive से AngularJS Application की शुरुआत होती है | ये Application का root element होता है | ये AngularJS को automatically initialize करता है |

HTML Document पर सिर्फ एक ही ng-app directive होती है | अगर एक से ज्यादा ng-app directives होती है तब HTML Document के पहले ही


Syntax for ng-app Directive in AngularJS

<html|body|div ng-app="">
---------
</html|body|div>

<html|body|div ng-app="myapp">
---------
</html|body|div>

ng-app Attribute's Parameters in AngularJS

ng-app = "" : ng-app attribute की value; optional है | value पर module name दिया जाता है |


Example for ng-app Directive in AngularJS

Source Code :
<html>
<head>
<script src="angularjs.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body>
<div ng-app = "">   
Enter Name: <input type = "text" ng-model = "name"><br />  
Hiii ! <span ng-bind = "name"></span><br />
</div>
</body>
</html>  
Output :
Enter Name:
Hiii !