How to link a custom button and method?
person2713 opened this issue · 0 comments
person2713 commented
I add custom button to form use next:
public layout = [
'*',
{ type: 'submit', title: 'Apply' },
{
type: 'button',
title: 'Save',
// onClick: this.exampleLog(event)
// onChanges: this.exampleLog(event)
onClick: 'exampleLog()'
}
];
public exampleLog() {
Log.create('Save').d('message');
}
Then I try to link button 'Save' and function "exampleLog()' but, i don't know how do it. I use angular 2 on typescript and json-schema for angular. Can you give me some example how do it?