InfomediaLtd/angular2-materialize

Toasts throw Cannot find name 'Materialize' error

markb21 opened this issue · 1 comments

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?

Have you tried importing directly from materializecss?

import { toast } from 'materialize-css';

Then use it by saying

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