Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Feature Request: fmt #264

Open
viniciussbs opened this issue Sep 1, 2020 · 0 comments
Open

Feature Request: fmt #264

viniciussbs opened this issue Sep 1, 2020 · 0 comments

Comments

@viniciussbs
Copy link

Hi!

Once in a while I need to do string concatatenation in templates. concat helper works, but it is not as legible as string literals.

{{concat "var(" @varName ", " @defaulValue ")"}}

Something like the old Ember.String.fmt would be more legible:

{{fmt "var(%@1,  %@2)", @cssVar @defaultValue}}

There is an implementation of this function in @GavinJoyce's ember-string-fmt that could be used. I don't know if his repo is a better place for this helper. What do you think?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant