I had beta25 working with angualr2-moment and I was using DateFormatPipe and CalendarPipe,
but now I am not able to do either
import {MomentModule} from 'angular2-moment';
or
import {DateFormatPipe, CalendarPipe} from 'angular2-moment';
both of them gives, doesn’t export module error. I am stuck with this now. I already had a production version of this app and now due to new releases after upgrade I am not able to even get the app up and running.
I tried using
import {MomentModule} from 'angular2-moment/module';
as well
it gives this errorin browser
Uncaught Error: Unexpected module ‘MomentModule’ declared by the module ‘AppModule’(anonymous function) @ metadata_resolver.js:275CompileMetadataResolver.getNgModuleMetadata @ metadata_resolver.js:262RuntimeCompiler.compileComponents @ runtime_compiler.js:126RuntimeCompiler._compileModuleAndComponents @ runtime_compiler.js:64RuntimeCompiler.compileModuleAsync @ runtime_compiler.js:55PlatformRef.bootstrapModuleWithZone @ application_ref.js:302PlatformRef.bootstrapModule @ application_ref.js:284(anonymous function) @ main.dev.js:3(anonymous function) @ main.dev.js:3
according to the changelog, (they updated it 10 hours ago) this should be fixed in the new version…
seeing your post is from 6 hours ago… are you using the latest version?
# Changelog
## 1.7.1 - 2017-12-22
- Fix bug where FromUtcPipe was being imported instead of exported ([#180](https://github.com/urish/angular2-moment/pull/180), contributed by [fshin123](https://github.com/fshin123))
- test: fix amLocal tests to pass regardless of timezone
## 1.7.0 - 2017-08-19
- Add `amFromUtc` pipe ([#163](https://github.com/urish/angular2-moment/pull/163), contributed by [connormlewis](https://github.com/connormlewis))
## 1.6.0 - 2017-07-18
- Add `amLocal` pipe ([#153](https://github.com/urish/angular2-moment/pull/153), contributed by [benwilkins](https://github.com/benwilkins))
## 1.5.0 - 2017-07-14
- Add `amLocale` pipe ([#155](https://github.com/urish/angular2-moment/pull/155), contributed by [FallenRiteMonk](https://github.com/FallenRiteMonk))
- Migrate testing framework to jest
## 1.4.0 - 2017-06-18
- Add `amParse` pipe to enable parsing of custom-formatted date string ([#148](https://github.com/urish/angular2-moment/pull/148), contributed by [vin-car](https://github.com/vin-car))
## 1.3.3 - 2017-03-18
This file has been truncated. show original
1 Like
Yeh, I dint realise there was an update after I downloaded it day before yesterday.
Thanks a lot.
beta3 works well.
1 Like