Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 带有输入的KendoUI对话服务_Angular_Kendo Ui Angular2 - Fatal编程技术网

Angular 带有输入的KendoUI对话服务

Angular 带有输入的KendoUI对话服务,angular,kendo-ui-angular2,Angular,Kendo Ui Angular2,我试图使用“确定”和“取消”按钮从用户收集文本输入数据。有没有关于如何做到这一点的例子?谢谢 我用这种方式。 例如: 我有以下服务: 从'@angular/core'导入{Injectable,TemplateRef}; 从“@progress/kendo angular dialog”导入{DialogService,DialogRef,}; @可注射() 导出类MyDialogService{ private _currentDialog:DialogRef; 构造函数(专用dialogSe

我试图使用“确定”和“取消”按钮从用户收集文本输入数据。有没有关于如何做到这一点的例子?谢谢

我用这种方式。 例如:

我有以下服务:

从'@angular/core'导入{Injectable,TemplateRef};
从“@progress/kendo angular dialog”导入{DialogService,DialogRef,};
@可注射()
导出类MyDialogService{
private _currentDialog:DialogRef;
构造函数(专用dialogService:dialogService){
}
打开(标题:字符串,内容:函数){
this.\u currentDialog=this.dialogService.open({
标题:标题,,
内容:内容
});
};
关闭(){
这是。_currentDialog.close();
}
}
从代码中,我的调用如下所示:

MyComponent:

@组件({
templateUrl:“./popup auth buy.component.html”
})
导出类PopupAuthBuyComponent实现OnInit{
…处理表单并与模型一起工作的逻辑
}
我的模板:


提交
希望,这有帮助

this.myDialogService.open('Buying', PopupAuthBuyComponent);
<div>
    <form (ngSubmit)="onSubmit()" #buyForm="ngForm">
        <YOUR INPUTS HERE />
        <kendo-dialog-actions>
            <button  kendoButton [primary]="true" type="submit" [disabled]="!buyForm.form.valid">Submit</button>
        </kendo-dialog-actions>
    </form>
</div>