Require NPM Module

I have an Ionic project setup and ready to rock.

However I am struggling to work out how to include a npm module into the app. I have made a reference to the npm module in the package.json file and run npm install, which successfully downloads the module into the npm_modules folder.

Q. How do I require the npm module and which file should this require line live in.

Also if anyone has a link on standard practices for adding npm modules into ionic that would be great.

Thanks in Advanced

So for ionic apps, npm modules would be delegated to to any build tasks, no front-end components. Bower would be the option to use

Could you please release an official npm package for ionic client files (.js and .css). Many of us are relying solely on NPM for both gulp tasks, server and client code. There is little use and point in adding dependency on Bower as well for most projects.

Most libraries are now available on NPM today and the majority of libraries are primarily downloaded from NPM and not Bower.

Please add to NPM and make sure it works fine with require and Browserify. Thanks!

https://www.npmjs.com/package/ionic-sdk

I am sure you guys have enough to do, but if the ionic-sdk module is the commonjs version of ionic - the follwing would be nice.

  • a better description page on npm which does not refer to the cli
  • a typescript declaration file that matches
  • better info on using browserify or webpack with ionic.

Otherwise its a great product - thanks