ng-app="app" cannot resolve symbol app

I'm not finding much on how to resolve this.

I'm running IntelliJ IDEA  Build #IU-183.4588.61

 

I've got an AngularJS site with no warning or errors except one.

The warning is Cannot resolve symbol 'app'

 

In my index.html, I've got ng-app="app" and I've got a module defined as 'app'

 

I'm not sure what I need to do to resolve this issue.  I wouldn't mind turning off the inspection, but I cannot find that option either.

 

0
5 comments

What does your module definition look like? Is the other stuff (custom directives, controllers, etc.) properly resolved?

1
Avatar
Permanently deleted user

Module definition looks like this:

angular.module( 'app', [
'ngRoute'
])

As far as I can tell controllers and directives are resolved; no warnings anyway...

0

Works fine for me using similar syntax:

Please try invalidating caches (File | Invalidate caches, Invalidate and restart) - does the problem persist? If yes, please share a project that can be used to recreate it

0
Avatar
Permanently deleted user

Solved the issue by marking the folder containing index.html as Resource Root.

 

Thanks for your help

1

I was seeing the same message: Cannot resolve symbol ‘APP’

Making the name lowercase seems to have resolved the message for my end.

Before:

ng-app="APP"

After:

ng-app="app"

0

Please sign in to leave a comment.