.directive('editable', function ($compile, $animate) {
return function (scope, element, attr) {
element.on('click', function (event) {
var popup = $compile('<div></div>')(scope)
.css({
position: 'absolute',
left: '50%', top: '50%',
width: '600px', height: '400px',
'margin-left': '-300px', 'margin-top': '-200px',
background: 'black'
});
element.append(popup);
})
}
})