Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice context #10

Open
behoyh opened this issue Dec 14, 2019 · 2 comments
Open

Slice context #10

behoyh opened this issue Dec 14, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@behoyh
Copy link

behoyh commented Dec 14, 2019

Is your feature request related to a problem? Please describe.
I can't two way bind specific properties in objects that I assign to the context.

Describe the solution you'd like
Assuming I have this child template:

  <ng-template contextDisposer="message" let-context>
        <input [ngModel]="context.message" />
  </ng-template>

I'd like to be able to do this:

  <ng-template contextDisposer="message" let-context>
        <input [ngModel]="context.message.title" ... />
  </ng-template>

The reason being then only a singular object can be a context for similar but different components, engaging date pickers, sliders, and/or image uploads into a singular model. The components can manipulate their own slice of the object which is then shipped to the server.

Thanks for this awesome framework!!

@armanozak armanozak added the enhancement New feature or request label Dec 17, 2019
@armanozak
Copy link
Contributor

Hey @behoyh,

First of all, thanks for your contribution. We are discussing with the team if and how we should implement this feature. It may take a while, but we are most definitely going to share our findings/progress. In the meantime, I beg your patience.

If you have a suggestion on how to proceed, please do share.

Have a nice day.

@behoyh
Copy link
Author

behoyh commented Dec 17, 2019

Hello @armanozak!

Thank you!

For now I have bound properties to a form and view; just like your demo shows. That seems to work quite well. Just to give you more context (no pun intended!) I'm hoping to build a platform for users to put up messaging on web and mobile platforms. In the future, I'd like users to be able to design their own forms to display their own custom message models in their apps.

You can see the current project here. I hope that one day this will be a powerful demo of ngx-context as forms can be composed dynamically with no ts boilerplate.

Have a great day!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants