mirror of https://github.com/nextcloud/contacts
22 lines
476 B
JavaScript
22 lines
476 B
JavaScript
angular.module('contactsApp')
|
|
.directive('detailsitem', ['$compile', function($compile) {
|
|
return {
|
|
scope: {},
|
|
controller: 'detailsItemCtrl',
|
|
controllerAs: 'ctrl',
|
|
bindToController: {
|
|
name: '=',
|
|
data: '=',
|
|
contact: '=model',
|
|
index: '='
|
|
},
|
|
link: function(scope, element, attrs, ctrl) {
|
|
ctrl.getTemplate().then(function(html) {
|
|
var template = angular.element(html);
|
|
element.append(template);
|
|
$compile(template)(scope);
|
|
});
|
|
}
|
|
};
|
|
}]);
|