(Feature Request) Action wrapper in template
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
No files or tests are named. Start by reproducing the strict-mode failure with the [(ngModel)] examples in the issue, then inspect the Angular template binding and action-related integration points. Done means a documented, tested decision on whether an in-template action wrapper is supported, including the requested syntax or its limitation.
Written by the indexing model from the issue text.
Description
So in mobx you can wrap anythin in an action wrapper , since actions are needed to modify state.
I have the following code
<input [(ngModel)]="mystore.foo>
since its a two way binding in strict mode it complains
what I am wondering is could you add a feature so that i could do this.
<input [(ngModel)]="action(() => myStore.foo)
I'm aware of the workaround to this.
`<input [ngModel]="myStore.foo" (ngModelChange)="setMyStore($event)">/input>
setMyStore(val:string){
this.myStore.setFoo(val) //action for setting
}
Is there a feature to be able to do an in-template action wrapper
- Dominant language
- TypeScript
- Stars
- 480
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mobxjs/mobx-angular
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
mobxjs/mobx-angular#133 · 2 comments ·
-
Docs/Examples help wanted
Difficulty 3/5 1-2 days Newbie friendliness 30/100
mobxjs/mobx-angular#90 · 1 reaction ·
All issues in mobxjs/mobx-angular
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·