-
Feb 20th, 2018, 07:32 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] backbone.js noob question
So I've found myself stuck with make mods to a front-end application with backbone.js. There seems to be these inline data bound elements like this:
Code:
<div class="alert alert-danger">
The total amount to be charged to your credit card will be the policy payment amount plus a ${{convenienceFee}} convenience fee.
</div>
How do I access that {{convenienceFee}} in javascript?
I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
-
Feb 20th, 2018, 08:55 PM
#2
Re: backbone.js noob question
You don't... well, not exactly. Not familiar with backbone, but it sounds like it's similar to node.js or angular, which means that it's MVC based... so your convenienceFee is in the model, and that's where you have direct access to it... The snip you posted is the view, which means it's (if you're following MVC) just the display and isn't to be manipulated here... it should already be done by the model.
-tg
-
Feb 21st, 2018, 10:25 AM
#3
Thread Starter
Frenzied Member
Re: backbone.js noob question
Thanks TG - I'll take a look a the model (well, see if I can figure out which one it is) and let you know how that goes.
I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
-
Feb 21st, 2018, 06:39 PM
#4
Thread Starter
Frenzied Member
Re: backbone.js noob question
Yep, sure enough - found the property on one of the models. Thanks for pointing me in the right direction TG.
I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|