AngularJS - Change controller by condition?

后端 未结 3 459
渐次进展
渐次进展 2021-01-24 19:21

I have a simple form with data which summarize the pressed items ( via addition)

(JSBIN)

\

3条回答
  •  时光说笑
    2021-01-24 19:42

    A simple way to choose controller, but keep the template the same, is to have the template in an external file, and wrap it in an ngIf, so:

    As can be seen in this Plunker

提交回复
热议问题