AngularJS Multiple ng-app within a page

后端 未结 13 2498
闹比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:19

    You can merge multiple modules in one rootModule , and assign that module as ng-app to a superior element ex: body tag.

    code ex:

        
    
    
    
    
    
    
    
    
    First Name:
    Last Name:

    Full Name: {{firstName + " " + lastName}}
    • {{first}}

提交回复
热议问题