Is it possible to apply multiple AngularJS controllers on the same element

后端 未结 6 1636
悲哀的现实
悲哀的现实 2021-01-31 08:58

Is it possible to apply multiple AngularJS controllers on the same element ?

6条回答
  •  礼貌的吻别
    2021-01-31 09:34

    You could extend a controller and use it wherever you like. See the Fiddle for a better example.

    
    

    With html like:

    
        
    {{text1}} {{text2}}

    Fiddle: http://jsfiddle.net/kkelly/thk9n20o/#base.com

提交回复
热议问题