Open In App

Web technologies Questions | AngularJS Quiz | Set-3 | Question 15

What is the output of the below code snippets:

<html>
     <head>
    <title>AngularJS ng-app Directive</title>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">
    </script>
   </head>

    <h2>ng-app directive</h2>
     
    <div ng-app="" ng-init="name='Angular'">
        <p>{{ name }} is framework of Javascript</p>
    </div>
</body>
 </html>
 
 

(A)



name is a framework of Javascript

(B)



{{ is framework of Javascript }}

(C)

Angular is the framework of Javascript

(D)

Type Error.

Answer: (C)
Explanation:

The ng-app Directive in AngularJS is responsible for the root element of application in Angular. It also directly shows the effect when the page is loading . The main advantage of ng-app is it is used to load various modules in AngularJs application.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :