Issue in showing angular2-modal popup, Did you add it to 
@NgModule.entryComponents? I am trying to show a popup using 
angular2-modal. I have added the modal dialog component under 
entryComponents in AppModule. But still I am getting this exception

Error occurred. No component factory found for DeleteStorybookConfirmDialog. 
Did you add it to @NgModule.entryComponents?
CustomErrorHandler.ts:15 Stack Trace : Error: No component factory found for 
DeleteStorybookConfirmDialog. Did you add it to @NgModule.entryComponents?
    at noComponentFactoryError 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:3309:34)
    at _NullComponentFactoryResolver.resolveComponentFactory 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:3327:15)
    at CodegenComponentFactoryResolver.resolveComponentFactory 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:3369:87)
    at SwapComponentDirective.set [as swapCmp] 
(https://unpkg.com/[email protected]/bundles/angular2-modal.umd.js:736:70)
    at updateProp 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:11000:37)
    at checkAndUpdateDirectiveInline 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:10700:19)
    at checkAndUpdateNodeInline 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:12124:17)
    at checkAndUpdateNode 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:12092:16)
    at debugCheckAndUpdateNode 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:12722:59)
    at debugCheckDirectivesFn 
(https://npmcdn.com/@angular/[email protected]//bundles/core.umd.js:12663:13)

My AppModule looks like below:

@NgModule({
    imports:
    [
       ..
        ModalModule.forRoot(),
      ..
    ],
    declarations:
    [
       ..
       DeleteStorybookConfirmDialog,
      ..

    ],
    entryComponents:
    [
        ..
        DeleteStorybookConfirmDialog

    ],
})

DeleteStorybookConfirmDialog component is as follows:-

import { Component, OnInit, OnDestroy, Input, Inject, OnChanges, SimpleChange } 
from '@angular/core';
import { Overlay, overlayConfigFactory } from 'angular2-modal';
import { Modal, BSModalContext } from 'angular2-modal/plugins/bootstrap';
import { DialogRef, ModalComponent, CloseGuard } from 'angular2-modal';

@Component({
    selector: 'delete-story-book-confirm-dialog',
    styles: [
        `modal-overlay{top: 25vh!important; left: 80vh!important;} 
.modal-dialog{width: 100px!important;}`
    ],
    providers: [Modal],
    templateUrl: './HTML/StoryBook/DeleteStorybookConfirmDialog.html'
})
export class DeleteStorybookConfirmDialog implements 
ModalComponent<StoryBookContext> {
    context: StoryBookContext;

    constructor(public dialog: DialogRef<StoryBookContext>,
        public modal: Modal)
        {}

}

any idea what is it I am missing here? why I am getting this error even 
after adding in the entryComponents?

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to