Angular.js and Fabric.js: Fabric canvas changes behavior once code is moved to a Angular Directive Angular.js and Fabric.js: Fabric canvas changes behavior once code is moved to a Angular Directive angularjs angularjs

Angular.js and Fabric.js: Fabric canvas changes behavior once code is moved to a Angular Directive


Remove the ng-controller="ImageCtrl" from your template, in is creating another $scope and instance of the Controller, and that breaks it.

<form name="uploadForm" /*ng-controller="ImageCtrl"*/ method="post" enctype="multipart/form-data"      action="/main/update" ng-submit="submit()">