Skip to content

Commit d354d95

Browse files
committed
0.4.5: bugfix
fire link function after document ready
1 parent 2a4243e commit d354d95

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "duoshuo",
3-
"version": "0.4.4",
3+
"version": "0.4.5",
44
"authors": [
55
"turing <o.u.turing@gmail.com>"
66
],

dist/duoshuo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/duoshuo.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-duoshuo",
3-
"version": "0.4.4",
3+
"version": "0.4.5",
44
"description": "a duoshuo SDK for angular.js, pure front-end, cross-domain request supported.",
55
"main": "dist/duoshuo.min.js",
66
"scripts": {

src/duoshuo.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@
6363
return {
6464
restrict: 'AE',
6565
replace: true,
66-
template: '<div class="ds-thread"></div>',
66+
template: '<div class="ds-thread-wrapper"></div>',
6767
link: function(scope, element, attrs) {
6868
// render comments when dom has been injected.
69-
angular.element(element[0])
70-
.append($duoshuo.render(attrs));
69+
angular.element(document).ready(function() {
70+
// fired after dom ready
71+
angular.element(element[0])
72+
.append($duoshuo.render(attrs));
73+
});
7174
}
7275
};
7376
});

0 commit comments

Comments
 (0)