How to connect ngModelChange to an action? #29050
Replies: 1 comment 1 reply
-
I just took a look and this seems to be sort of a bug. Looking at the code, I think I understand what is going on, but I am trying to remember the reason before I can say if this is a bug that needs to be fixed. If it isn't going to be fixed, the docs or maybe a logged warning should be added to make it more obvious what is going on. What you have should work, based on the docs, but for Angular The following should be a working version of your snippet. I set the export default {
title: 'Framework/CodeEditor',
component: CodeEditorComponent,
argTypes: {
disabled: {
control: 'boolean',
},
change: { action: 'ngModelChange' },
},
render: args => ({
props: args,
template: `
<div>
<sqx-code-editor
(ngModelChange)="change($event)"
[ngModel]="ngModel">
</sqx-code-editor>
</div>
`,
}),
decorators: [
moduleMetadata({
imports: [
FormsModule,
],
}),
],
} as Meta; Edit: Fixed binding based on comment. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have the following story definition
I have shorten it a little bit. Now I try to figure out how to bind
ngModelChange
to an action. Nothing seems to work, butngModel
works actually fine.Beta Was this translation helpful? Give feedback.
All reactions