Open agborkowski opened 9 years ago
Same here. Inside a directive, at least, I never have access to $scope.$flow, nor do any of these events fire.
btw. files are attached properly and uploaded, console.log(events) in flowProvider return properly events but name events are different than flow::fileAdded maybe this is the point ?
You should put flow-init directive in the same dom element as controller
...and that Sir, is how you end a discussion :)
What if you want to initialize flow with an options variable defined as a scope variable of a directive's controller?
ie:
index.html:
<upload-files></upload-files>
uploadFiles.js:
angular.module('app').directive('uploadFiles', function(){
return {
templateUrl: 'example.html',
scope: {}, // mine has some bound values, this is just to show the isolate scope request
link: function(){},
controller: function($scope){
$scope.flowInitOptions = {
example: 1
};
}
};
});
example.html :
<div flow-init="flowInitOptions"></div>
I'm not able to get any of the event directives to work (specifically flow-files-added or flow-file-added), and I can't access them on the directive's controller scope. I know I could shove all this up a level to the angular controller level, but architecturally that doesn't match the style we're going for (directive heavy, prepping for angular 2 porting, etc).
do i need add something special like flowProvider to catch events inside controllers cause simple