I want to check if a string contains a specific sequence of characters in some component markup using an expression. The Expression Functions Reference lists equals
but nothing that looks suitable. And I don't see a way to hook in your own functions in expressions.
Can this be accomplished on the fly or am I stuck with finding some earlier point in the code to perform the check and store it in yet another attribute?
Best Answer
Honestly it's a good feature to have in LC but at the moment we are limited to the function expression as mentioned in here. So only option we have is, to do
includes/indexOf...
stuffs in the controller/helper and set the appropriate attribute value.For eg:
controller.js