【发布时间】:2014-10-23 03:33:43
【问题描述】:
我是使用 Angular js 的新手,我已经声明了许多控制器,现在我想将一个控制器的用户功能应用到另一个控制器中。这是我的示例代码。
app.controller('Controller1',function($scope,$http,$compile){
$scope.test1=function($scope)
{
alert("test1");
}
});
app.controller('Controller2',function($scope,$http,$compile){
$scope.test2=function($scope)
{
alert("test1");
}
});
app.controller('Controller3',function($scope,$http,$compile){
///
});
现在我想在 controller3 中调用 test2 函数。 任何人都可以帮助.. 感谢 Avance... :)
【问题讨论】:
标签: javascript jquery angularjs