Skip to content

Commit

Permalink
0.4.5: bugfix
Browse files Browse the repository at this point in the history
fire link function after document ready
  • Loading branch information
guo-yu committed Aug 19, 2014
1 parent 2a4243e commit d354d95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duoshuo",
"version": "0.4.4",
"version": "0.4.5",
"authors": [
"turing <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/duoshuo.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 dist/duoshuo.min.js.map

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-duoshuo",
"version": "0.4.4",
"version": "0.4.5",
"description": "a duoshuo SDK for angular.js, pure front-end, cross-domain request supported.",
"main": "dist/duoshuo.min.js",
"scripts": {
Expand Down
9 changes: 6 additions & 3 deletions src/duoshuo.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@
return {
restrict: 'AE',
replace: true,
template: '<div class="ds-thread"></div>',
template: '<div class="ds-thread-wrapper"></div>',
link: function(scope, element, attrs) {
// render comments when dom has been injected.
angular.element(element[0])
.append($duoshuo.render(attrs));
angular.element(document).ready(function() {
// fired after dom ready
angular.element(element[0])
.append($duoshuo.render(attrs));
});
}
};
});
Expand Down

0 comments on commit d354d95

Please sign in to comment.