which one is best to use to access custom labels from Skuid ? (I found couple of ways - please read

Hello All,

I found couple of ways to access custom labels from Skuid.

1. skuid.utils.mergeAsText(“global”,“{{$Label.YOUR_LABEL}}”);
2. skuid.$L(‘YOUR_LABEL’,‘someValue’);


I am looking for an expert opinion/best practice insights into this point.

Which of these above would be great to implement and can anyone throw some light on differences ?



Kvin,

Technically both work to show labels, though in general you’ll probably want to use skuid.$L(‘LABEL’,‘defaultValue’). You would use skuid.utils.mergeAsText(“global”,“{{$Label.YOUR_LABEL}}”) if you wanted to escape HTML; for example, if you had “&” in your label and wanted it to show as “&” instead of “&”.

Thanks!