Skip to content

Commit 96b980e

Browse files
committed
refactor(tooltip): remove child scope
1 parent 0d4c2e2 commit 96b980e

File tree

7 files changed

+106
-127
lines changed

7 files changed

+106
-127
lines changed

Diff for: src/popover/popover.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ angular.module( 'ui.bootstrap.popover', [ 'ui.bootstrap.tooltip' ] )
99
return {
1010
restrict: 'EA',
1111
replace: true,
12-
scope: { title: '@', content: '@', placement: '@', animation: '&', isOpen: '&' },
1312
templateUrl: 'template/popover/popover.html'
1413
};
1514
})

Diff for: src/popover/test/popover.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ describe('popover', function() {
1919
$compile(elmBody)(scope);
2020
scope.$digest();
2121
elm = elmBody.find('span');
22-
elmScope = elm.scope();
22+
elmScope = elm.isolateScope();
2323
}));
2424

2525
it('should not be open initially', inject(function() {
26-
expect( elmScope.tt_isOpen ).toBe( false );
26+
expect( elmScope.isOpen ).toBe( false );
2727

2828
// We can only test *that* the popover-popup element wasn't created as the
2929
// implementation is templated and replaced.
@@ -32,7 +32,7 @@ describe('popover', function() {
3232

3333
it('should open on click', inject(function() {
3434
elm.trigger( 'click' );
35-
expect( elmScope.tt_isOpen ).toBe( true );
35+
expect( elmScope.isOpen ).toBe( true );
3636

3737
// We can only test *that* the popover-popup element was created as the
3838
// implementation is templated and replaced.
@@ -42,7 +42,7 @@ describe('popover', function() {
4242
it('should close on second click', inject(function() {
4343
elm.trigger( 'click' );
4444
elm.trigger( 'click' );
45-
expect( elmScope.tt_isOpen ).toBe( false );
45+
expect( elmScope.isOpen ).toBe( false );
4646
}));
4747

4848
it('should not unbind event handlers created by other directives - issue 456', inject( function( $compile ) {

0 commit comments

Comments
 (0)