shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

ErrorUncaught (in promise): Error: DI Error #337

Open rrohitesh opened 7 years ago

rrohitesh commented 7 years ago

Hello All,

I am getting

ErrorUncaught (in promise): Error: DI Error Error: DI Error at NoProviderError.ZoneAwareError (http://localhost:8425/js/polyfills.5fe0f3494eca66cea073.js:16498:34) at NoProviderError.BaseError [as constructor] (http://localhost:8425/js/vendor.5fe0f3494eca66cea073.js:1327:21)

when my component is getting rendered please help.

thardes2 commented 7 years ago

Are you sure you followed the complete tutorial?

import { NgModule }       from '@angular/core';
import { BrowserModule }  from '@angular/platform-browser';

import { ModalModule } from 'angular2-modal';
import { BootstrapModalModule } from 'angular2-modal/plugins/bootstrap';

import { AppComponent }   from './app.component';

@NgModule({
  imports: [ 
    BrowserModule, 
    ModalModule.forRoot(),
    BootstrapModalModule
  ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }

Probably you're missing the ModalModule.forRoot() or BootstrapModalModuleentry