0

I want to load in two static resource js files. My code:

<ltng:require scripts="{!join(',' $Resource.resource1, $Resource.resource2)}"/>

On save attempt, I get the following error:

expecting a right parenthesis, found '$Resource' at column 10 of expression: join(',' $Resource.resource1, $Resource.resource2):

I tried sticking the two resources into two different ltng:require, which means I can save the page:

<ltng:require scripts="{! $Resource.fileStack }"/>
<ltng:require scripts="{! $Resource.filestackConnector }"/>

but then I get error:

Custom Script Eval error in "ltng:require" [SecureDOMEvent: [object Event](key: {"namespace":"c"}}]

1 Answer 1

2

you missed comma after ','. It should be

<ltng:require scripts="{!join(',', $Resource.resource1, $Resource.resource2)}"/>

Check Expression Functions Reference.

Joins the substrings adding the separator String (first argument) between each subsequent argument.

It has arguments, first is separator and all arguments should be separated by a comma.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .