In my view i'm binding to file upload so:
<input type="file" name="file" onchange="angular.element(this).scope().photoChanged(this.files)"/>
and i have such directive:
.directive('imageCrop', function () {
return {
template: '<div style="display: none;"><p>Image!</p></div>',
restrict: 'E',
link: function postLink(scope, element, attrs) {
element.text('this is the imageCrop directive');
}
};
});
how could i in controller's method make this directive visible and send to it my image?
which practice is the best in this case?