Skip to content
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

Toasts throw Cannot find name 'Materialize' error #425

Open
markb21 opened this issue Apr 11, 2018 · 1 comment
Open

Toasts throw Cannot find name 'Materialize' error #425

markb21 opened this issue Apr 11, 2018 · 1 comment

Comments

@markb21
Copy link

markb21 commented Apr 11, 2018

Hi,
I am trying to use toasts in my app but I always get this error:
Cannot find name 'Materialize' error

Here is an example app (https://github.com/markbudiak/angular-materialize-starter) where it happens.
When you run the app with ng serve --poll=2000 it fails. Do some change in any of the app files like add space and save the file. The app will reload, it will again throw the same error but it will run this time.

Am I using the toast incorrectly? Does anyone know why I am getting this error?

@markb21 markb21 changed the title Using Toasts throws Cannot find name 'Materialize' error Toasts throws Cannot find name 'Materialize' error Apr 11, 2018
@markb21 markb21 changed the title Toasts throws Cannot find name 'Materialize' error Toasts throw Cannot find name 'Materialize' error Apr 11, 2018
@pain0486
Copy link

Have you tried importing directly from materializecss?

import { toast } from 'materialize-css';

Then use it by saying

toast('I am a funny toast! ', 4500);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants