What is the cause for “angular is not defined”

前端 未结 3 1180
Happy的楠姐
Happy的楠姐 2020-11-27 19:09

I\'m following the video tutorials on egghead.io but while trying to follow his example when he created a factory (see video here) I keep getting \"angular is not defined\"

3条回答
  •  独厮守ぢ
    2020-11-27 19:20

    You have to put your script tag after the one that references Angular. Move it out of the head:

    
    
    

    The way you've set it up now, your script runs before Angular is loaded on the page.

提交回复
热议问题