-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i had bug in angular2-moment #11
Comments
Can you try to change the import to
and see if it helps? |
thanks you so much 2016-02-02 5:18 GMT+07:00 Uri Shaked notifications@github.com:
|
Hi, I have the same bug. (even when I use @urish solution) |
@danielgolub are you using typescript? |
@urish Yes. |
Can you please include the output that you get? |
seems to be a configuration problem. When you go to http://localhost:3000/angular2-moment, do you see the code of the module or a 404 error page? |
404 error page. |
I would suggest to check your configuration, if you are using system.js you need to configure the module loader correctly so that it can correctly locate the |
Well I followed the "Hero" setup on angular.io website. tsconfig.json:
package.json:
And on index.html:
|
Can you please upload the entire code to a git repo? |
@urish, I added you as a collaborator on the git repo. |
Seems like the following System.js configuration should do the trick for you:
And then, import the module as follows:
In general, I would suggest to study System.js in detail if you intend to use it in your project, it will save you much time in the future. |
It works. Thanks. |
i used ionic 2 and angular2 for build app.
im run npm install --save angular2-moment
and i add import {TimeAgoPipe} from 'angular2-moment';
pipes: [TimeAgoPipe],
for file .js
but it error
Module parse failed: D:\xampp\htdocs\1000ngayvang_app\node_modules\angular2-mome
nt\TimeAgoPipe.ts Line 3: Unexpected token
You may need an appropriate loader to handle this file type.
The text was updated successfully, but these errors were encountered: