Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. angular.module('myApp').directive('customDirective', ['$http', function ($http) {
  2.  
  3. return {
  4. controller() {
  5.  
  6. },
  7. compile(element) {
  8. const $fileinput = $('<input type="file" accept=".csv">').appendTo(element);
  9. return {
  10. controller: () => {
  11. $fileinput.on('change', (e) => {
  12. // Stuff happens
  13. });
  14. },
  15. link: () => {
  16. },
  17. };
  18. },
  19. };
  20. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement