Skip to content

Commit

Permalink
Add workaround for IE11, fixes #59.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenv committed Aug 11, 2014
1 parent 86e71cb commit 77f039c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/angular-gettext.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ angular.module('gettext').directive('translate', [
priority: -350,
link: function (scope, element) {
var msgstr = element.prop('__msgstr');
element.html(msgstr);
element.empty().append(msgstr);
$compile(element.contents())(scope);
}
};
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-gettext.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ angular.module('gettext')
priority: -350,
link: function (scope, element) {
var msgstr = element.prop('__msgstr');
element.html(msgstr);
element.empty().append(msgstr);
$compile(element.contents())(scope);
}
};
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<p>Action with var: <button translate ng-click="action()">Hello {{name}}</button></p>
<p>Plural: <span translate translate-plural="There are {{count}} birds" translate-n="count">There is {{count}} bird</span></p>
<p>With ng-if: <span translate ng-if="count == 1">Hello</span></p>
<h1 translate>Hello {{name}}</h1>
<hr />
<p><button ng-click="change()">Change it!</button></p>
<p><button ng-click="language()">Language</button></p>
Expand Down

0 comments on commit 77f039c

Please sign in to comment.