0
親愛なるStackOverflowのコミュニティを開くwon`t私のコードのsnipetは(私は多くのことをexlucedましたが、私は考えています角度2ダイアログは、私はここにあなたにエラーを与えるbefor私は、angular2ダイアログに問題があり、</p> <p>を
import {Component, OnInit, NgZone, SimpleChanges} from '@angular/core';
import {MdDialog} from '@angular/material';
import template from './signup.component.html';
@Component({
selector: 'signup',
template
})
export class SignupComponent implements OnInit {
constructor(private router: Router, private zone: NgZone, private formBuilder: FormBuilder, public dialog: MdDialog) {
}
openDialog() {
this.dialog.open(DialogOverviewExampleDialog);
}
@Component({
selector: 'dialog-overview-example-dialog',
templateUrl: './dialog.html',
})
export class DialogOverviewExampleDialog {}
signup.component.htmlファイル:
<h3 flex>Just<a (click)="openDialog()">Click here</a></h3>
彼らは
signup.component.tsファイル)ここで重要なのではないかもしれません210
とdialog.html:
<p>pls work</p>
私はChromeで、コンソール上でこのエラーが発生します。 DialogOverviewExampleDialog
これは私が馬鹿になっているかもしれませんが、どこでentryComponentsを見つけることができますか? –
'@NgModule()'に渡されるオブジェクトにあります。これは通常app.module.tsファイルにあります。 –
多くの人に感謝:それは働いた。めっちゃ幸せ –