fix(compiler): revert 8611ebe6 - calling \$digest after linking

Change introduced by me in 8611ebe6 results in considerable inefficiencies when the compiler
and linker is used from within a widget, in which case, we call $digest unnecessary since it
will be called by the $apply which called the directive/widget in the first place.

There are only two places when the extra $digest call can be useful - when manually bootstrapping
the app or in tests. However even in tests this behavior can result in unwanted results (especially
when ng:controller is involved). So it is better to leave it for the developer to call $digest
when it is really needed.
This commit is contained in:
Igor Minar
2011-10-20 15:37:37 -07:00
parent 7fc18b263d
commit f38010d3a2
4 changed files with 13 additions and 17 deletions

View File

@@ -110,7 +110,6 @@ describe('compiler', function() {
expect(sortedHtml(scope.$element)).
toEqual('<div>' +
'before<#comment></#comment>' +
'<span>x</span>' +
'after' +
'</div>');
scope.value = 1;
@@ -119,7 +118,6 @@ describe('compiler', function() {
toEqual('<div>' +
'before<#comment></#comment>' +
'<span>x</span>' +
'<span>x</span>' +
'after' +
'</div>');
scope.value = 2;
@@ -129,7 +127,6 @@ describe('compiler', function() {
'before<#comment></#comment>' +
'<span>x</span>' +
'<span>x</span>' +
'<span>x</span>' +
'after' +
'</div>');
scope.value = 3;
@@ -140,7 +137,6 @@ describe('compiler', function() {
'<span>x</span>' +
'<span>x</span>' +
'<span>x</span>' +
'<span>x</span>' +
'after' +
'</div>');
});