Undefined attribute name ng-app

Undefined attribute name ng-app

If you are working with AngularJS and include its directive to your HTML page you will see below warning in eclipse:

Undefined attribute name (ng-app).

2014-11-16_1836

Solution: This happens because eclipse is not recognizing AngularJS directive tag and give warning. To fix this you have two option:

  • Option 1: Ignore validation for undefined attribute name. To do this: Right click project –> Properties –> Validation –> HTML Syntax –> Attributes –> Undefined attribute name –> Ignore as below then click OK:

Undefined attribute name ng-app

This will fix the issue and you won’t see warning any more as below:

Undefined attribute name ng-app

  • Option 2: Include data key word before ng directive which eclipse recognizes as below:

Undefined attribute name ng-app

For more information abot AngularJS pelease refer its API here

Leave a Reply

Your email address will not be published. Required fields are marked *