Login with:


Or:


Not a member? Sign Up

Forgot Password?

Signup with:


Or:


Already have an account? Log in

MDB Angular 4.3.7 ToastService Error

MDB SupportCategory: MDB AngularMDB Angular 4.3.7 ToastService Error
Pro User asked 6 days ago in MDB pro, version:3.7

Hi,

For your information, there is a bug in the MDB Angular 4.3.7 version:

Module ‘”/src/app/typescripts/pro/index”‘ has no exported member ‘ToastService’

To correct it, you have to put in the /src/app/typescripts/pro/index.ts file:

export {
ToastService
} from ‘./alerts/’;

Best regards

dantavious Pro User replied 6 days ago

Thanks for this post. It really helped me out.

3 Answers
Dawid Adach Pro User answered 5 days ago

Dear ,

did you used a fresh copy of MDB or did you upgrade the previous version to 4.3.7 ?

In 4.3.7 we have excluded ToastService from Alerts as it has to be loaded separately as singleton. You can find more information on how to import it in our documentation as well as changelog:

ChangeLog

Please follow the instructions, otherwise, you might encounter other issues with Toast while loading MDB in multiple components

 

Dawid Adach Pro User replied 2 days ago

Guys,
please check the docs which I have placed within original answer. There was a change, you SHOULD NOT load ToastModule from import { ToastService } from ‘./typescripts/pro; , but from import {ToastService} from ‘../../typescripts/pro/alerts’

Don Irwin Pro User replied 4 days ago

 I downloaded a fresh copy of mdb-angular-pro-4.3.7.zip and get the same error 🙁

shuailiu.usa Pro User replied 4 days ago

I got exactly same error.

dantavious Pro User replied 5 days ago

I did use a fresh copy. I tried it again today and receive the following error.

ERROR in /data/code/linux/mdb-angular-pro/src/app/app.component.ts (2,10): Module ‘”/data/code/linux/mdb-angular-pro/src/app/typescripts/pro/index”‘ has no exported member ‘ToastService’.
webpack: Failed to compile.

vizmedia Pro User answered 4 days ago

The same problem occurred in my newest version.

The app.component.ts file must be changed line:

import { ToastService } from ‘./typescripts/pro;

to

import { ToastService } from ‘./typescripts/pro/alerts’;
Don Irwin Pro User answered 4 days ago

I downloaded a fresh copy of mdb-angular-pro-4.3.7.zip and get the same error.

Dawid Adach Pro User replied 2 days ago

Indeed ,
as per newest docs which I have placed within original answer. There was a change, you SHOULD NOT load ToastModule from import { ToastService } from ‘./typescripts/pro; , but from import {ToastService} from ‘../../typescripts/pro/alerts’

Don Irwin Pro User replied 4 days ago

removing `import { ToastService } from ‘./typescripts/pro;` from app.component.ts fixed this for me.