I need to share a component in several sites of my Jhipster application (4.8.2) and I have added my component in the file: shared-libs.module.ts
:
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgJhipsterModule } from 'ng-jhipster';
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
import { CookieModule } from 'ngx-cookie';
import { InfobipMailComponent} from '../infobip/infobip.mail.component'
@NgModule({
imports: [
NgbModule.forRoot(),
NgJhipsterModule.forRoot({
// set below to true to make alerts look like toast
alertAsToast: false,
i18nEnabled: true,
defaultI18nLang: 'en'
}),
InfiniteScrollModule,
CookieModule.forRoot()
],
declarations: [
InfobipMailComponent,
],
exports: [
FormsModule,
HttpModule,
CommonModule,
NgbModule,
NgJhipsterModule,
InfiniteScrollModule,
InfobipMailComponent
]
})
export class Crm482SharedLibsModule {}
It seems that everything is going well, but the NgModel directive within that component has stopped working.
Can't bind to 'ngModel' since it isn't a known property of 'input'.
If it's value, I put it without directive {{value}}
it reads it perfectly, the problem is when I use it within an "input" with the NgModel directive
Can someone help me solve the problem ?
Thank you.