Uncaught ReferenceError: angular is not defined - AngularJS not working

后端 未结 5 1636
醉话见心
醉话见心 2020-12-05 04:19

I\'m attempting to learn angular and I am struggling with a simple button click.
I followed an example which has an identical code to the one below.

The result I

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 04:19

    As you know angular.module( declared under angular.js file.So before accessing angular.module, you must have make it available by using (In your case) after then you can call angular.module. It will work.

    like

    
    
      
      My AngularJS App
      
    
      
      
      
      
      
      
      
    
        
    
    
        

    {{2+3}}

提交回复
热议问题