EvanGu

Results 6 comments of EvanGu

> Replace the hmac.lua (sum 48606) with the one at https://github.com/jkeys089/lua-resty-hmac > (sum 54340) and it all works again after replace hmac.lua, it works

楼主好,按照您说的方法,使用rootScope进行广播,会出现如下错误,是为什么呢? TypeError: $rootScope.$broadcast is not a function

有啊注入$rootScope, 但是还是报错! 另外,有个问题想请教一下,如果使用ng-view, 会出现跨Scope的两个Ctrl1与Ctrl2之间的通信问题,Ctrl2中的$rootScope不等于Ctrl1中的$rootScope,这个怎么解决呢? index.html : ``` ... B ... ``` sub.html : ``` {{ content }} ``` JS : ``` JavaScript var myApp= angular.module('myApp', [ 'ngRoute' ]); myApp.config(['$routeProvider', function($routeProvider)...

我刚刚测试了一下,只用angular按照rootScope的方法通信没问题,估计是我用了bootstrap 和 OpenLayer 等之后就出问题了。

我知道问题了,是 ``` myApp.controller('Ctrl1',['$scope','$document','$rootScope',function($scope,$rootScope){ $scope.click = function(e, c){ $rootScope.$broadcast('Update', "CCC"); } }]); ``` 多写了一个$document,然后对应到了function参数$rootScope了, 解决方法,删掉$document

可以离线安装 detectron2 ``` git clone https://github.com/facebookresearch/detectron2.git cd detectron2 && pip install -e . ```