1.定义
var m = angular.module('ddd',[]); m.controller('ctrl',['$scope',function ($scope) { }]);
2.外部调用
angular.element('[ng-controller=ctrl]').scope().data = json.data; angular.element('[ng-controller=ctrl]').scope().$apply();