Skip to content

ng-droplet in Angularjs using without $on #71

@Ajita24

Description

@Ajita24

Hi
I am trying to add a drag and drop file upload.I am using ng-droplet. The documentation states that event needs to be binded on controller this way:

$scope.$on('$dropletReady', function whenDropletReady() {
$scope.interface.allowedExtensions(['png', 'jpg', 'bmp', 'gif', 'svg', 'torrent']);
$scope.interface.setRequestUrl('upload.html');
$scope.interface.defineHTTPSuccess([/2.{2}/]);
$scope.interface.useArray(false);
});
I need to use the event without $on just like simple method call Angularjs, i.e. in html I have


and somehow I could bind a function defined in controller to this droplet.Can this be done?Can these events be defined in HTML,$on is not being recognized in controller. Hence some insight would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions