How to run two separate Angular js apps in the same page

后端 未结 3 1441
甜味超标
甜味超标 2020-12-05 10:08

New to Angular. I feel like I\'m missing something obvious: Shouldn\'t I easily be able to run to separate AngularJs apps (modules) in the same html page? Something like thi

3条回答
  •  臣服心动
    2020-12-05 10:22

    According to the Angular docs for ngApp:

    Use this directive to auto-bootstrap an application. Only one directive can be used per HTML document. The directive designates the root of the application and is typically placed at the root of the page.

    Seems it's by design.

提交回复
热议问题