Multiple apps and controllers in the same file

后端 未结 2 1765
攒了一身酷
攒了一身酷 2020-12-16 08:09

In this AngularJS code:




  

        
2条回答
  •  攒了一身酷
    2020-12-16 08:51

    The JSFiddle showing the problem is here: http://jsfiddle.net/DEnB2/

    Automatic initialization of a ng-app directive occurs only once but you can manually initialize additional modules using the bootstrapping method. (See: https://docs.angularjs.org/guide/bootstrap)

    The JSFiddle with the solution is here: http://jsfiddle.net/DEnB2/5/

    
    
    
      
      
      Test Controllers
    
    
      
    {{name}}
    {{name}}

提交回复
热议问题