Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Ionic index.html cannot find moment.js and angular-moment.js #246

Open
daggeto opened this issue Apr 27, 2016 · 4 comments
Open

Ionic index.html cannot find moment.js and angular-moment.js #246

daggeto opened this issue Apr 27, 2016 · 4 comments

Comments

@daggeto
Copy link

daggeto commented Apr 27, 2016

Hi i'm getting this errors on application start in console:
screen shot 2016-04-27 at 9 03 12 am
Steps i do:
npm install angular-moment moment --save
then add this to index.html

<script src="components/moment/moment.js"></script>
<script src="components/angular-moment/angular-moment.js"></script>

I spent last night on this. Tried to install with bower. Changed lot of path combinations. What could be wrong?

@urish
Copy link
Owner

urish commented Apr 27, 2016

Seems like you need to install it with bower if you expect to find it inside components.

When you use npm, it is installed inside node_modules, and then you will probably need webpack or browserify to consume that.

@AntonioRossi
Copy link

if installed using bower, add this instead:
`

<script src="lib/moment/min/moment.min.js"></script>

<script src="lib/angular-moment/angular-moment.min.js"></script>

`

@silviu-at
Copy link

Hi Antonio,

Why would you need to go to /lib, shouldn't the components be directly into the bower_components directory?

@Mxxim
Copy link

Mxxim commented Aug 7, 2016

@TSilviu,
In your project root directory, add a new file .bowerrc, you can specify the installation directory in bower. As for me,it's { "directory":"app/libs" }, if you dont specify,default bower_components directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants