Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Wv Men
Added: Mar 18, 2019 11:09 PM
Modified: Mar 22, 2019 11:33 AM
Views: 11
Tags: no tags
  1.   private modal: NzModalRef,
  2.      this.modal.destroy(null);
  3.  
  4.  
  5.  
  6.      const modal = this.modalService.create({
  7.       nzTitle: '写文章',
  8.       nzContent: PaperEditorComponent,
  9.       nzComponentParams: {
  10.         canInitPaper: true
  11.       },
  12.       nzWidth: 720,
  13.       nzFooter: [{
  14.         label: '取消',
  15.         onClick: (componentInstance) => {
  16.           componentInstance.handleCancel();
  17.         }
  18.       }, {
  19.         label: '确定',
  20.         onClick: (componentInstance) => {
  21.           componentInstance.handleAddModOk();
  22.         }
  23.       }]
  24.     });
  25.     modal.afterClose.subscribe((paper) => {
  26.       if (paper && paper.id) {
  27.         this.dataService.push(paper);
  28.         this.router.navigate(['article/']);
  29.       }
  30.     });