Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70439

Material.angular with Ionic

$
0
0

@Vinodhumm wrote:

Hi,
how to use material.angualr.io datepicker with Ionic ?
here is what I did,

npm install --save @angular/material @angular/cdk
npm install --save @angular/animations

import {MatDatepicker} from '@angular/material';

@NgModule({
  declarations: [
    MyApp,
  ],
  imports: [
    BrowserModule,
    MatDatepicker,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
  ]
})
export class AppModule {}

also tried import in component module.

and I keep getting below error

I anyidea what am I doing wrong ? or how to fix the issue of “please add @NgModule annotation”

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 70439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>