You need to sign in to do that
Don't have an account?
Ken Koellner
What are "v" and "c" in the Expenses example in the Lightning Component Developers Guide?
I'm working through Expenses example in the Dev Guide and see "v." and "c." in several locations but they aren't things that are declare anywhere.
Are these well-known objects that have to be referenced via "v" and "c"? Like mayb "v" is view and "c" is controller" or something like that?
I'm curious if the code could be altered and the "v." and "c." terms could be changed if they are declared somewhere or if I'm coding in this style, must I use objects referred to by the specific named "v" and "c".
Are these well-known objects that have to be referenced via "v" and "c"? Like mayb "v" is view and "c" is controller" or something like that?
I'm curious if the code could be altered and the "v." and "c." terms could be changed if they are declared somewhere or if I'm coding in this style, must I use objects referred to by the specific named "v" and "c".
I feel a little better if they are constant than if they are declared variables. I know a lot of examples use one character variables like "Opportunity o;" or "Exception e" but I happen to deplore it as it makes global renames when refactoring code a pain. At least "Exception ex" and "Opportunity opp" make it easier to read.
https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/expr_source.htm
- When we use v.abc, we are actually calling value hold by attribute abc.
- When we use c.xyz, we are calling value return by the controller It can be server-side-controller (.JS controller )or client-side-controller (Apex Class)
Hence It is called as value providers because they are providing value.
You can also check the following link to learn salesforce lightning development from scratch
https://www.salesforcekid.com/p/blog-page_25.html
Ajinkya Dhas,
https://www.salesforcekid.com
Please select this answer as best answer if it helps Thank You.