question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 1.5 Component

See original GitHub issue

Great plugin.

I’m using it in an Angular 1.5 app built with component architecture.

Everything is working just fine but I’m struggling to work out how to get a ref of the ng-dropzone object in my component controller, in order to call the getDropzone() method.

<div class="dropzone" options="vm.dzOptions" callbacks="vm.dzCallbacks" methods="vm.dzMethods" ng-dropzone></div>

I need to be able to populate the dropzone with files which already exists on the server.

Any help much appreciated.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JulienBourgaincommented, Sep 7, 2016

@sicollins

angular.componant(<name>, {
  templateUrl: <url>.html,
  controller: function () {
     vm.$onInit = function() {
       var dz = vm.dzMethods.getDropzone(); 
       console.log(dz);
     }
   }
}

the $onInit function on the component is here for that 😉

I have put a ‘+1’ for the “populate the dropzone” part of your issue :p

0reactions
thatisudaycommented, Sep 20, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

AngularJS: Developer Guide: Components
In AngularJS, a Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure....
Read more >
Exploring the Angular 1.5 .component method
AngularJS 1.5 introduced the .component() helper method, which is much simpler than the .directive() definition and advocates best practices ...
Read more >
A Guide to Building Quality Angular 1.5 Components
In Angular 1, components are the mechanism which allows you to create your own custom HTML elements. This has been possible with Angular...
Read more >
Build an Angular 1.5 component - An AngularJS Tutorial
A component is basically a directive that uses a simpler configuration and that is suitable for a component-based architecture, which is what ...
Read more >
Try AngularJS 1.5 - 12 of 33 - A Controller & Component
Try AngularJS 1.5 - 12 of 33 - A Controller & Component Try AngularJS is a step-by-step introduction to the AngularJS framework version...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found