We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there a way to 'reset' a binding before updating it?
For example, if I have this:
{data: { image: "someimage.jpg" }} <img rv-src="data.image" />
it produces this after binding:
<img rv-src="data.image" src="someimage.jpg" />
But when I update the model with this:
{data: { image: "some-other-image.jpg" }}
the old image is still in place until the browser loaded the new image.
I'm also having an issue where attributes that I add don't get cleared out when updating:
<img rv-src="data.image" />
Becomes:
Then, I add an attribute through javascript:
<img rv-src="data.image" src="someimage.jpg" data-custom-attr />
But when I update the model it still has the attribute (without me adding it):
<img rv-src="data.image" src="some-other-image.jpg" data-custom-attr />
What I want is rivets to use the template I initially used to bind the data, not what's currently in the DOM (because I may need to change that).
I hope the above is clear enough..?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there a way to 'reset' a binding before updating it?
For example, if I have this:
it produces this after binding:
<img rv-src="data.image" src="someimage.jpg" />
But when I update the model with this:
{data: { image: "some-other-image.jpg" }}
the old image is still in place until the browser loaded the new image.
I'm also having an issue where attributes that I add don't get cleared out when updating:
<img rv-src="data.image" />
Becomes:
<img rv-src="data.image" src="someimage.jpg" />
Then, I add an attribute through javascript:
<img rv-src="data.image" src="someimage.jpg" data-custom-attr />
But when I update the model it still has the attribute (without me adding it):
<img rv-src="data.image" src="some-other-image.jpg" data-custom-attr />
What I want is rivets to use the template I initially used to bind the data, not what's currently in the DOM (because I may need to change that).
I hope the above is clear enough..?
The text was updated successfully, but these errors were encountered: