Just starting my Angular journey and running into some trouble trying to set up a practical and responsive menu using SidebarNav and Dropdown.
I used CLI to install and configure angular2-materialize and materialize-css.
To create the menu, I made a component called "Navbar" and followed these steps:
In app.module.ts:
import 'materialize-css';
// import * as M from 'materialize-css/dist/js/materialize';
import { MaterializeModule } from 'angular2-materialize';
@NgModule({
// ... ,
imports: [
// ... ,
// M,
MaterializeModule
],
})
However, I keep getting this error message:
Uncaught Error: Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize.
The solutions suggested in the forum haven't been helpful for me so far.