Problem including external Angular2 module "kekeh/mydatepicker" on Ionic2 (iOS)


#1

I tried to install this module on my Ionic2 app as told on the documentation.

  1. Import it on app.module.ts
    import { MyDatePickerModule } from ‘mydatepicker’;

    @NgModule({
    imports: [ BrowserModule, MyDatePickerModule ],

Then I used on my .html

It is working fine on the web browser via ionic serve. However once I try to use it on my iPad for testing, I got the following error:

Error: Module parse failed: .../node_modules/mydatepicker/src/my-date-picker/my-date-picker.module.ts Unexpected character '@' (6:0)
You may need an appropriate loader to handle this file type.
| import { InputFocusDirective } from "./directives/my-date-picker.input.directive";
| 
| @NgModule({
|     imports: [CommonModule],
|     declarations: [MyDatePicker, InputFocusDirective],, http://192.168.0.5:8100/build/main.js, Line: 67

Any ideas on how could I fix it? Has anyone imported another Angular2 external module successfully?


#2

Same problem here.

I tried to install the module ionic2-tag-input and it is working fine on web browser. But in Android i got the following error.

I/chromium( 5353): [INFO:CONSOLE(49)] "Uncaught Error: Module parse failed: C:\xampp\htdocs\stratus\mobile\node_modules\angular2-tag-input\lib\tag-input.module.ts Unexpected character '@' (12:0)
I/chromium( 5353): You may need an appropriate loader to handle this file type.
I/chromium( 5353): | import { TagInputItemComponent } from './components/tag-input-item/tag-input-item.component';
I/chromium( 5353): |
I/chromium( 5353): | @NgModule({
I/chromium( 5353): |   imports: [