meterial design javascript method from angular 7 componet

I am building a website in which i am using ‘creative tim template for dashbaord’
I am using date and time picker ,the issue i am facing is the datetime picker is initialized only once and ‘it worked when the component and loaded for the first time but when i switch components then datetime picker stop working’,

the solution that i’ve found out is i have to initilize datetimepicker every time component is loaded by using initialize method in component
but then i receive the error src/app/components/booktrip/booktrip.component.ts(24,5): error TS2304: Cannot find name ‘md’.

here’s my code

 ngOnInit() {
   md.initFormExtendedDatetimepickers(); // here i have the isssue

My angular.json is

 "scripts": [

and the error i am getting is

i am not able to generate production build .

I stuck too much time is there any possible solution ??

Source: Angular

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.