Giter Site home page Giter Site logo

Comments (10)

elineopsommer avatar elineopsommer commented on July 22, 2024 1

I followed the steps described by @mauricionarcizo , but i keep getting this error:
/Users/Eline/Documents/Stack & Heap/project kvk app/kvkapp/node_modules/angular2-moment/TimeAgoPipe.ts:3 import {Pipe, ChangeDetectorRef, PipeTransform, OnDestroy} from 'angular2/core'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'

from ngx-moment.

urish avatar urish commented on July 22, 2024 1

Should be fixed by 0.8.0. Just upgrade to latest angular2-moment and import it like this:

import {TimeAgoPipe} from 'angular2-moment';

from ngx-moment.

danielgolub avatar danielgolub commented on July 22, 2024

+1

from ngx-moment.

mauricionarcizo avatar mauricionarcizo commented on July 22, 2024

I'm using angular2-moment in my projeto ionic with success.
Steps to use:

npm install angular2-moment -> version 0.5.0 is compatible with ionic-angular beta 6

In my page/component declare the pipes, like this:

import {TimeAgoPipe} from 'angular2-moment/TimeAgoPipe.js';

@component({
pipes:[TimeAgoPipe]
})

In my Html:

{{lastSync | amTimeAgo}}

from ngx-moment.

elineopsommer avatar elineopsommer commented on July 22, 2024

This is not working for me.
i'm using:
"angular2": "2.0.0-beta.15", "angular2-moment": "^0.8.0", "ionic-angular": "2.0.0-beta.6",
I'm not getting the error anymore, but it also doesn't work.

from ngx-moment.

urish avatar urish commented on July 22, 2024

What does your import statement look like?
On May 23, 2016 12:35 AM, "eevine" [email protected] wrote:

This is not working for me.
i'm using:
"angular2": "2.0.0-beta.15",
"angular2-moment": "^0.8.0",
"ionic-angular": "2.0.0-beta.6",


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#33 (comment)

from ngx-moment.

elineopsommer avatar elineopsommer commented on July 22, 2024

The same like you said: import {TimeAgoPipe} from 'angular2-moment';

from ngx-moment.

urish avatar urish commented on July 22, 2024

And which error do you get?
On May 23, 2016 1:34 AM, "eevine" [email protected] wrote:

The same like you said: import {TimeAgoPipe} from 'angular2-moment';


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#33 (comment)

from ngx-moment.

elineopsommer avatar elineopsommer commented on July 22, 2024

I get no errors anymore with the 0.8.0 version, but it also doesn't go to the page where I used the pipe in the html. I'll make a plunker.

from ngx-moment.

elineopsommer avatar elineopsommer commented on July 22, 2024

It works now, no clue why, I did everything again and now it works. Thanks.

from ngx-moment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.