Closed ryanbuening closed 5 years ago
Check that you have imported needed modules in your app module. Here is working example: https://github.com/kekeh/angular-mydatepicker/blob/master/example/app/app.module.ts
I double checked and I appear to be importing the necessary things into my app.module.ts
. I'm using the FormsModule
.
I am switching from the old ngx-mydatepicker
to this new library. Not sure if that is causing some kind of issue? I did npm uninstall ngx-mydatepicker
before installing this new library though.
I created a new project and reproduced the same issue:
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AngularMyDatePickerModule } from 'angular-mydatepicker';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
AngularMyDatePickerModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
app.component.html
am I not importing something correctly? Do I need to import something into app.component.ts
?
I have used angular 7.2.0 in this new component. You have older version.
You can follow instructions from readme file.
I created my new project and used Angular 7.2.0 and still had the same issue. Sounds like it is just me though. I'll just continue to use ngx-mydatepicker
. Closing.
I added
AngularMyDatePickerModule.forRoot()
to my imports but I'm getting the following errors below in my html template. I'm using Angular 7.1.2