Skip to content

An easy, clean and customizable way to inject actionable HTML into strings. Useful for translations with placeholders that require links.

License

Notifications You must be signed in to change notification settings

zeshan321/ngx-string-injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ngx-string-injector NPM version

An easy, clean and customizable way to inject actionable HTML into strings. Useful for translations with placeholders that require links.

Problem

When dealing with translations, there are moments when we need to have links or click actions. Typically translations have placeholders to indicate where values should go since the location of the placeholder would be different depending on the language. For example:

In English:

Please click this link {0}.

In Japanese:

このリンク{0}をクリックしてください。

Many solutions online are not reusable, take time, messy and difficult to maintain. ngx-string-injector tries to solve all these issues.

Examples

Simple example: Link

Advanced example with reusable rendering: Link

About

An easy, clean and customizable way to inject actionable HTML into strings. Useful for translations with placeholders that require links.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published