Skip to content

Commit

Permalink
fix(modal): fix service path
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSurmay committed Jun 14, 2017
1 parent d52e9f0 commit 62ae2c4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion demo/src/app/components/+modal/demo-modal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { ModalModule } from '../../../../../dist/modal';
import { ModalModule } from 'ngx-bootstrap/modal';

import { SharedModule } from '../../shared';
import { ModalSectionComponent } from './modal-section.component';
Expand Down
21 changes: 21 additions & 0 deletions demo/src/app/components/+modal/demos/service/service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Component, ElementRef, Renderer, TemplateRef, ViewContainerRef } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { ModalContainerComponent } from 'ngx-bootstrap/modal';
import { ModalContentComponent } from './modal-content.component';

@Component({
selector: 'demo-modal-service',
templateUrl: './service.html'
})
export class DemoModalServiceComponent {
public modalRef: ModalContainerComponent;
constructor(private modalService: BsModalService, private element: ElementRef, private renderer: Renderer, private vcRef: ViewContainerRef) {
this.modalService = this.modalService.create(this.element, this.vcRef, this.renderer);
}
public openModal(template: string | TemplateRef<any>) {
this.modalRef = this.modalService.show(template, {backdrop: false});
}
public openModalWithComponent() {
this.modalService.show(ModalContentComponent);
}
}
11 changes: 6 additions & 5 deletions src/modal/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { ModalBackdropComponent, ModalBackdropOptions } from './modal-backdrop.component';
export { ModalOptions } from './modal-options.class';
export { ModalDirective } from './modal.component';
export { ModalModule } from './modal.module';
export { BsModalService } from './bs-modal.service';
export {ModalContainerComponent} from './modal-container.component';
export {ModalBackdropComponent, ModalBackdropOptions} from './modal-backdrop.component';
export {ModalOptions} from './modal-options.class';
export {ModalDirective} from './modal.component';
export {ModalModule} from './modal.module';
export {BsModalService} from './bs-modal.service';

0 comments on commit 62ae2c4

Please sign in to comment.