2016-03-19 11:02:13 +00:00
|
|
|
angular.module('contactsApp')
|
|
|
|
.directive('detailsitem', ['$compile', function($compile) {
|
2016-02-22 20:34:10 +00:00
|
|
|
return {
|
|
|
|
scope: {},
|
|
|
|
controller: 'detailsItemCtrl',
|
|
|
|
controllerAs: 'ctrl',
|
|
|
|
bindToController: {
|
|
|
|
name: '=',
|
2016-02-23 12:29:20 +00:00
|
|
|
data: '=',
|
2017-10-31 19:16:59 +00:00
|
|
|
contact: '=model',
|
2017-02-09 21:28:47 +00:00
|
|
|
index: '='
|
2016-02-22 20:34:10 +00:00
|
|
|
},
|
|
|
|
link: function(scope, element, attrs, ctrl) {
|
|
|
|
ctrl.getTemplate().then(function(html) {
|
|
|
|
var template = angular.element(html);
|
|
|
|
element.append(template);
|
|
|
|
$compile(template)(scope);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}]);
|