0

Im using stackblitz code editor and im trying to implement calendar in my app using angular materials but got this error.

enter image description here

here's the link https://stackblitz.com/edit/angular-ivy-2ucboy?file=src/app/app.component.ts

2
  • 1
    Hello, i cant see any problem of importing MatModules. But i see that you bootstrap in main just Datepicker component. Try to bootsrap as default appComponent. Commented Oct 7, 2020 at 7:57
  • Hi there, please consider providing your code inline as links may go down or be inaccessible at any point. Commented Oct 7, 2020 at 9:48

1 Answer 1

2

For some reason, you are bootstrapping your app in main.ts? That's why your actual app.module.ts file is redundant. You need to import the relevant modules into your main.ts file, as that is where your AppModule is declared.

See this working demo.

Sign up to request clarification or add additional context in comments.

2 Comments

your example has been bootstrapped in main.ts for other reasons, there's no need for you to do this. If you do, then you'll need to import the relevant modules in main.ts.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.