问题
I am using Kendo Upload in my Angular 2 application.I have inject servcie for error message and file permissible size,but when KendoValidator called, this.service is already undefined.
export class MyUpload implements AfterViewInit {
private message:string="message error":
constructor() {
}
ngAfterViewInit(): any {
$("#files").kendoUpload({
multiple: false
});
$("#uploadForm").kendoValidator({
messages: {
fileSize: message
},
rules: {
fileSize: function (e: any) {
return ....;
}
},
validateOnBlur: false
});
}
How can I use this.service for getting size and message?
来源:https://stackoverflow.com/questions/39848910/kendovalidator-acces-to-angular2-component-property