如何绑定工厂,指令和控制器 [英] How to bind factory, directive and controller
本文介绍了如何绑定工厂,指令和控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将两个不同的实例绑定到一个指令和控制器
参见示例 Plunker [ ^ ]
1.我怎样才能避开模板,并使用指令的innerhtml?
2.这是正确的方式吗? ngFriendController似乎没用了
我尝试过:
i尝试过使用transclude,并已试图用在ngFriendController $范围,而更新两个指令。
解决方案
上ngFriendController范围,而更新两个指令。
I want to bind two diference instance to one directive and controller
see example Plunker[^]
1. how can i avoid the template, and use the innerhtml of the directive?
2. it is the correct manner? the ngFriendController seems useless
What I have tried:
i have tried to use transclude, and have tried to use $scope on ngFriendController, but update both directives.
解决方案
scope on ngFriendController, but update both directives.
这篇关于如何绑定工厂,指令和控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文