Undefined attribute name ng-controller

Undefined attribute name ng-controller

If you see warning Undefined attribute name ng-controller on your html or jsp page while using Angular.js:

Undefined attribute name ng-controller

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

Option 2: Add data keyword before directive as below:

Undefined attribute name ng-controller

For more information abot AngularJS pelease refer its API here

One thought on “Undefined attribute name ng-controller

Leave a Reply

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