look at this example...!
ng-app include data-ng-app then it takes effect....but unnecessery to make 
that! ;)

<!DOCTYPE html>
<html lang="en-US">
<script 
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js";></script>
<body>

<div ng-app="">
  <p>Name : <input type="text" ng-model="name"></p>
  <h1>Hello {{name}}</h1>
  <p>sum={{ 5 + 5}}</p>

<div data-ng-app="test">
<p>sum={{ 5 + 5}}</p>
</div>

</div>
</body>
</html>

On Thursday, June 13, 2019 at 10:55:19 AM UTC+2, Chiheb Ben Jemia wrote:
>
> hi
> 1/ ng-app and data-ng-app are the same thing, except validation...
> 2/ ng-app is used in one time to define your app...
>
> so, in your exemple, only the first div (ng-app) will take effect, the 
> second div (data-ng-app) will be considered as a simple html...
>
>
> On Thursday, June 13, 2019 at 5:31:59 AM UTC+2, abhi ram wrote:
>>
>> <!DOCTYPE html>
>> <html lang="en-US">
>> <script src="
>> https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js
>> "></script>
>> <body>
>>
>> <div ng-app="">
>>   <p>Name : <input type="text" ng-model="name"></p>
>>   <h1>Hello {{name}}</h1>
>>   <p>sum={{ 5 + 5}}</p>
>> </div>
>> <div data-ng-app="">
>> <p>sum={{ 5 + 5}}</p>
>> </div>
>>
>> </body>
>> </html>
>>  i dont know why it showing different output
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/8ee417fd-36ec-49fe-a30e-fef220df7072%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to