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">
....