-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: Couldn't find Materialize object on window #440
Comments
I am having the same issue after following the instuctions section titled 'Installing & configuring angular2-materialize in projects created with the Angular CLI' at https://www.npmjs.com/package/angular2-materialize. Any help wold be appreciated. |
What worked for me was upgrading angular to ^6.1.7 and, after that, npm update. |
angular2-materialize use materialize version '0.100.2'. In your package.json change materialize-css to "^0.100.2". |
I tried to do what @sergiutritean and @MatheusBueno said, but didn't work.
I've been trying to find another solution to fix this error, because I don't like that one. After all, I put the declarations on the style and script... should be working without those links |
@bjgrassi After change in package.json do you run npm install in your project ? |
I am having the same problem and I did upgrade angular to 6.1.7 and materialize-css to 0.100.2. Still nothing... |
correction -- I upgraded angular to 6.1.7 and materialize-css to 0.100.2 AND ran npm install in my directory - AND IT WORKED! thanks @MatheusBueno! |
I had the very same problem and I was going nuts. I upgraded Angular to 6.1.9, materialize-css to 0.100.2 (as @sergiutritean, @MatheusBueno and @jefrice very well recommended; thanks guys) BUT I needed to add
in order to create a missing angular.json file, as explained here. I hope this can help. Keep going! |
Hi! i got the solution for this! first modify your package.json file in dependencies section adding these 4 lines "angular2-materialize": "^15.1.10", "hammerjs": "^2.0.8", "jquery": "^2.2.4", "materialize-css": "^0.100.2", it must look like this
then in your .angular-cli.json file in scripts and style sections add this in this specific order
delete your node_modules directory and run
Hope this helps!! it works for me perfectly! |
It took me two days to figure out what the problem was but finally i was able to resolve it by reading a comment by some guy on stackOF that goes: |
@deenkadir , i did the same but I am having issues with routing. how did you solve it ? |
Hi everyone I have the same problem and tested the different proposed solutions but I still have the same problem. already change in my package.json the dependencies and run npm install but it is not installed correctly materialize css and angular2-materialize in the browser presents the following message in console: ### "could not find materialize object on window. it is created by the materialize-css library. please import materialize-css before importing angular2-materialize." Post: I am using angular 7 for this project and I want the front-end to use materialize |
Use angular material which is designed for angular. |
Hi,
I've tried to use MaterializeCSS on my Angular 6 app. I'm using
materialize-css
andangular2-materialize module
fromnpm
. When I run the app it builds successfully. But I've got this error from the browser consoleUncaught Error: Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize.
Though I've import them in the app.module.ts
Here is my code:
app.module.ts
styles
andscripts
array from angular.jsonI haven't find any proper solution about this issue on internet :(
The text was updated successfully, but these errors were encountered: