Upgraded to 1.4.1 and now: Argument 'SearchPopover' is not a function, got undefined

时间:2015-06-25 18:41:27

标签: angularjs angularjs-directive angularjs-controller

First I had to fix the following: controller: SearchPopover Changed to controller: 'SearchPopover as spop', My Directive & Controller below, I've tried: .module('searchPopoverDirectives', ['searchPopoverDirectives.SearchPopover']) but then I get an undetailed error Uncaught Error: (function() { "use strict"; angular .module('searchPopoverDirectives', []) .directive('searchPopover', directive); function directive() { var directive = { templateUrl : 'popovers/searchPopover/searchPopover.html', restrict: "E", replace: false, bindToController: true, controller: 'SearchPopover as spop', // controllerAs: 'spop', link: link, scope: {} }; return directive; function link(scope, element, attrs) {} } SearchPopover.$inject = [ '$scope', '$rootScope', '$timeout', 'ApiFactory', 'ScopeFactory', 'TagFactory', 'TickersSelectFactory', 'TagDetailsFactory', 'ViewFactory']; function SearchPopover( $scope, $rootScope, $timeout, ApiFactory, ScopeFactory, TagFactory, TickersSelectFactory, TagDetailsFactory, ViewFactory) { Markup <div ng-controller="SearchPopover" ng-class="{'display-on': searchPopoverDisplay}" class="search-popover"> ....

0 个答案:

没有答案