2

How can I import a module, e.g. pikaday from another one, e.g. handsontable in angularjs from the node_modules?

import {pikaday} from handsontable

doesn't seem to work.

1 Answer 1

4
  1. If you using angular1, then you should also add them as dependencies:

angular.module('YourApp', ['ngHandsontable','pikaday']);

  1. If you using angular2, then it should be like:

import { Pikaday } from 'picaday', you can Read more here

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the reply. I'm using angular1. Should I also import it import 'pikaday' ? It still seems to not be found (after also importing it). I'm getting this error: Uncaught Error: Cannot find module 'pikaday'
no need of import in angular1, just add reference to your html. like <script src="ngHandsontable.js"></script>, and add dependecies to your module like angular.module('YourApp', ['ngHandsontable','pikaday']); ReadMore, pikaday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.