contacts/js/components/propertyGroup/propertyGroup_directive.js

21 lines
466 B
JavaScript
Raw Normal View History

2017-10-31 15:57:54 +00:00
angular.module('contactsApp')
.directive('propertygroup', function() {
return {
scope: {},
controller: 'propertyGroupCtrl',
controllerAs: 'ctrl',
bindToController: {
properties: '=data',
2017-10-31 18:13:19 +00:00
name: '=',
2017-10-31 19:16:59 +00:00
contact: '=model'
2017-10-31 15:57:54 +00:00
},
2017-10-31 18:13:19 +00:00
templateUrl: OC.linkTo('contacts', 'templates/propertyGroup.html'),
link: function(scope, element, attrs, ctrl) {
if(ctrl.isHidden()) {
// TODO replace with class
element.css('display', 'none');
}
}
2017-10-31 15:57:54 +00:00
};
});