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

Allow re-render in the client-side with different parameters #295

Open
matteofigus opened this issue Sep 26, 2016 · 0 comments
Open

Allow re-render in the client-side with different parameters #295

matteofigus opened this issue Sep 26, 2016 · 0 comments

Comments

@matteofigus
Copy link
Member

matteofigus commented Sep 26, 2016

When a component is rendered inside a container, it would be nice to have a functionality for re-rendering it with different parameters (in an override mode).

My idea:

  1. When component is rendered like
<oc-component href="https://registry.com/my-component/1.x.x/?parameter=x&parameter2=y" data-name="my-component" ...>
...
</oc-component>
  1. and doing javascriptin the browser like
var $myComponent = $('oc-component[data-name="my-component"]');
oc.overrideParameters($mycomponent, { parameter: 'hello' });
oc.renderNestedComponent($mycomponent, callback);
  1. the component will re-render with href: https://registry.com/my-component/1.x.x/?parameter=hello&parameter2=y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant