We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看了文件說明,可以透過 Data 傳資料給 DialogComponent ,但沒有範例,不知如何使用 感謝
The text was updated successfully, but these errors were encountered:
pass data to DialogComponent like this:
this.dialog.dialog({ title: "lex 公式编辑器", dialogComponent: TargeComponent, isModal: false, data: { mathlex: mathlex, parentCallback: (lex, svg) => { · · · } } });
then access data (data is not available before ngOnInit)
ngOnInit
@Component({ selector: "mathjax", template: ` . . . <button [disabled] ="!mathlex" (click)="done();">done</button> . . . ` }) export class MathDialog { private mathlex; private parentCallback; . . . constructor(private ly:NgLayerRef) {} private done(){ /*data from parent component*/ console.log(this.mathlex); /*a callback function from parent component*/ this.parentCallback(this.sourceLex, this.mathSvg); this.ly.close(); } }
Sorry, something went wrong.
讚,另外也可透過 service 來傳遞,但沒那麼漂亮就是了 thank's
No branches or pull requests
看了文件說明,可以透過 Data 傳資料給 DialogComponent ,但沒有範例,不知如何使用
感謝
The text was updated successfully, but these errors were encountered: