I am very new in Lightning App Development. I am getting an error this error(Uncaught error in $A.run() : component is not defined) When i want to pass the component value to the Apex(Server-Side Controller) in lightning using JS(Client-Side Controller).
Here is my Code for my Code
Best Answer
One problem is that in your button, the press attribute shouldn't be written as a merge field.
You also have a misspelling in your client-side controller. It should be:
You might be getting the message "component is not defined" because the variable was named "componet"
Also, you could also simplify you server-side controller if you wanted: (unrelated to the error)