0 votes
in Angular by (6.0k points)
Explain ng-app directive in Angular.

1 Answer

0 votes
by (30.4k points)
ng-app directive is used to define Angular applications which let us use the auto-bootstrap in an Angular application. It represents the root element of an Angular application and is generally declared near <html> or <body> tag. Any number of ng-app directives can be defined within an HTML document but just a single Angular application can be officially bootstrapped implicitly. Rest of the applications must be manually bootstrapped.

Example

<div ng-app=“myApp” ng-controller=“myCtrl”>

First Name :

<input type=“text” ng-model=“firstName”>

<br />

Last Name :

<input type=“text” ng-model=“lastName”>

<br>

Full Name: {{firstName + ” ” + lastName }}

</div>
Click here to read more about Angular JS
Click here to read more about Insurance

Related questions

0 votes
asked Feb 5, 2021 in Angular by SakshiSharma (30.6k points)
+1 vote
asked Jan 15, 2020 in Angular by sharadyadav1986 (30.4k points)
0 votes
asked Jan 6, 2020 in Angular by sharadyadav1986 (30.4k points)
0 votes
asked Nov 24, 2019 in Angular by rajeshsharma (23.1k points)
0 votes
asked Jun 6, 2022 in Angular by john ganales (13.0k points)
0 votes
0 votes
asked Jan 6, 2020 in Angular by sharadyadav1986 (30.4k points)
...