how to add third party angular directives to meteor application

536 views Asked by At

I'm using angular-meteor library to develop a meteor application with angular as a front-end.

I need to add an angular directive called angular-file-upload.

When I use this directive in my node/angular app, it is installed via bower, and has this folder structure:

    angular-file-upload folder contains 

angular-file-upload.js 
as well as a sub-folder named src,
 which contains 3 files: 

intro.js, module.js and outro.js

What is the process of installing such third party angular directives?

Is this done with meteor add command, or by placing these files manually into specific directories?

2

There are 2 answers

0
Greenhorn On BEST ANSWER

Check out this link, if those are the actual packages which serve your purpose then you can directly add them to you Meteor app by using meteor add <package-name> command in the terminal.

While the alternate way to do this is by adding these .js files manually to public or lib folder and link them to your corresponding HTML pages. But I would personally prefer the 1st way to do this.

2
oshai On

You can create the library by yourself. There are few alternatives to do that.

Basically it goes down to these steps:

  • add package.js in root directory
  • meteor publish --create

The complete details how to do that can be found here: http://angular-meteor.com/tutorial/step_19