Failed to instantiate module error in Angular js

后端 未结 6 1107
我在风中等你
我在风中等你 2021-01-01 10:33

I encountered the following error with a root cause of Module \'ngRoute\' is not available

Uncaught Error: [$injector:modulerr] Faile

6条回答
  •  孤独总比滥情好
    2021-01-01 11:18

    Such error happens when,

    1. You misspell module name which you injected.
    2. If you missed to include js file of that module.
    

    Sometimes people write js file name instead of the module name which we are injecting.

    In these cases what happens is angular tries to look for the module provided in the square bracket []. If it doesn't find the module, it throws error.

提交回复
热议问题