通过mdDialog angular 1.5与ES6组件打开组件未呈现

时间:2018-10-10 16:29:09

标签: angular ecmascript-6 mddialog angular1.6

我已经创建了一个组件

RuleDialog组件---

class RuleDialogController {
  constructor() {
    debugger;
    this.message = "hello";
  }
}
export const RuleDialogComponent = {
  bindings: {
    data: '<'
  },
  RuleDialogController,
  templateUrl: './rule.dialog1.html'
}

在我的模块中---

import 'angular'

import {RuleDialogComponent} from './rule-dialog/rule-dialog1-component.js'
import {NewSeverityComponent} from './rule-new/rule-new-component.js'

angular.module('analyzerApp')
       .component('ruleDialog',RuleDialogComponent)
       .name

在另一项服务中,我正在尝试打开模式-

$mdDialog.show({
            template: '<rule-dailog></rule-dailog>',
            parent: $rootElement,
            preserveScope: true,
            clickOutsideToClose: true
          });

但是当它以HTML呈现时,我得到的是没有实际的html呈现---

<div class="md-dialog-container ng-scope" tabindex="-1" md-theme="" style="top: 0px; height: 449px;"><div class="md-dialog-focus-trap" tabindex="0"></div><md-dialog class="_md md-transition-in" role="dialog" tabindex="-1" id="dialogContent_8" aria-describedby="dialogContent_8" style=""><rule-dailog data="hello"></rule-dailog></md-dialog><div class="md-dialog-focus-trap" tabindex="0"></div></div>

请帮助 让我知道您是否需要更多信息

0 个答案:

没有答案