Можете ли вы реструктурировать директиву следующим образом, возможно, это синтаксическая ошибка.
Изменение заключается в том, что свойства обернуты в объект и возвращены внутри директивы!
var app = angular.module('myApp', []);
app.controller('MyController', function MyController($scope) {
});
app.directive('centerTabs', function() {
return {
restrict: 'E',
// templateUrl: 'app/home/directives/html/center-tabs.template.html',
template: '<h1>hello!</h1>',
controller: function(){},
controllerAs: 'centerTab',
scope: {
accountList: '=',
emailsOpened: '=',
contractsOpened: '='
}
};
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div ng-controller='MyController' ng-app="myApp">
<center-tabs account-list="home.accountList" emails-opened="home.emailsOpened" contracts-opened="home.contractsOpened" layout="row" flex>
</center-tabs>
</div>