You need to sign in to do that
Don't have an account?
Jugbeer Bhola
Lightning Component - Dynamic Url Buttons
Trying to build dynamic buttons in a lightning component. An array is loaded will labels and URL's. As I loop through the array I have gotten it to a point where the buttons show up. Now I need to have a URL in that button to launch. None of the attributes I have tried will do it. Any direction would be great.
add a onclick method to the button and attribute data-id on button, next thing is in js function (onlick event of button) in JS controller get the data-id attribute value , search this value in your list and get the URL and navigate to it.
something like this
thanks
All Answers
add a onclick method to the button and attribute data-id on button, next thing is in js function (onlick event of button) in JS controller get the data-id attribute value , search this value in your list and get the URL and navigate to it.
something like this
thanks