AngularJS Multiple ng-app within a page

后端 未结 13 2578
闹比i
闹比i 2020-11-22 01:48

I have just started learning Angular JS and created some basic samples however I am stuck with the following problem.

I have created 2 modules and 2 controllers.

13条回答
  •  感动是毒
    2020-11-22 02:17

    Only one app is automatically initialized. Others have to manually initialized as follows:

    Syntax:

    angular.bootstrap(element, [modules]);
    

    Example:

    
    
    
    
      
      
      
      
    
    
    
      
    Hello {{name}} !
    Hello {{name}} !

    AngularJS API

提交回复
热议问题