我的角度模块上有2个控制器。
app.controller('MainCtrl', ['$scope', '$http', '$timeout',
function($scope, $http, $timeout) { .... }];
app.controller('FooterCtrl', ['$scope',
function($scope) { .... }];
第一个工作正常,但第二个根本没有被处理。即使其功能中的console.log()
也不起作用。
他们的注册方式相同。非常奇怪,一个人工作,但另一个人只是跳过了。
Plunkr在这里。
注意:FooterCtrl
中使用的footer-cell.html
控制器不在index.html
修改:看起来问题出在我正在使用的inspector-gadget
模块上。在其顶部元素中使用FooterCtrl
工作正常,但将其放在<inspector-title>
或<inspector-content>
会导致此问题。很奇怪,因为他们的documentation显示了它的使用
<inspector-content>
。