Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-bind-html directive handling #11

Open
myukselen opened this issue Jan 5, 2017 · 1 comment
Open

ng-bind-html directive handling #11

myukselen opened this issue Jan 5, 2017 · 1 comment

Comments

@myukselen
Copy link

If a constant string with inner attributes having " is used,
ng-bind-html directive is not handled correctly.

For example, we want to translate this:

<div class="footer-right">Created with <i class="ion-heart"></i></div>

We change it to:

<div class="footer-right" ng-bind-html="'Created with <i class=&quot;ion-heart&quot;></i>' | translate"></div>

However this creates a json like:

{
    "Created with <i class=&quot;ion-heart&quot;></i>": "Created with <i class=&quot;ion-heart&quot;></i>"
}

Since attribute " is not handled properly, angular-translate cries with:

Translation for Created with <i class="ion-heart"></i> doesn't exist
@myukselen
Copy link
Author

I have a small fix, creating a PR now.

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

No branches or pull requests

1 participant