阅读背景:

AngularJS中控制器1的访问方法

来源:互联网 
    angular.module('starter.controllers', [])
    .controller('controller1',function($scope) {
    $scope.function1= function () {
    ---------------
    })
    .controller('controller2',function($scope) {
    $scope.function1= function () {
    //is it possible to access method form controller1 in controller2 like this
controller1.function();
    })
    angular.module('starter.controllers', [])
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: