我需要在角度j的另一个控制器中调用函数.如果有可能,请提前帮助我
代码:
app.controller('One', ['$scope',
function($scope) {
$scope.parentmethod = function() {
// task
}
}
]);
app.controller('two', ['$scope',
function($scope) {
$scope.childmethod = function() {
// Here i want to call parentmethod of One controller
}
}
]);
Run Code Online (Sandbox Code Playgroud)