This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,15 @@ angular.scenario.Application.prototype.executeAction = function(action) {
92
92
}
93
93
angularInit ( $window . document , function ( element ) {
94
94
var $injector = $window . angular . element ( element ) . injector ( ) ;
95
+ var $element = _jQuery ( element ) ;
96
+
97
+ $element . injector = function ( ) {
98
+ return $injector ;
99
+ } ;
100
+
95
101
$injector . invoke ( function ( $browser ) {
96
102
$browser . notifyWhenNoOutstandingRequests ( function ( ) {
97
- action . call ( self , $window , _jQuery ( $window . document ) ) ;
103
+ action . call ( self , $window , $element ) ;
98
104
} ) ;
99
105
} ) ;
100
106
} ) ;
Original file line number Diff line number Diff line change @@ -103,25 +103,25 @@ angular.scenario.dsl('browser', function() {
103
103
104
104
api . url = function ( ) {
105
105
return this . addFutureAction ( '$location.url()' , function ( $window , $document , done ) {
106
- done ( null , $window . angular . element ( $window . document ) . injector ( ) . get ( '$location' ) . url ( ) ) ;
106
+ done ( null , $document . injector ( ) . get ( '$location' ) . url ( ) ) ;
107
107
} ) ;
108
108
} ;
109
109
110
110
api . path = function ( ) {
111
111
return this . addFutureAction ( '$location.path()' , function ( $window , $document , done ) {
112
- done ( null , $window . angular . element ( $window . document ) . injector ( ) . get ( '$location' ) . path ( ) ) ;
112
+ done ( null , $document . injector ( ) . get ( '$location' ) . path ( ) ) ;
113
113
} ) ;
114
114
} ;
115
115
116
116
api . search = function ( ) {
117
117
return this . addFutureAction ( '$location.search()' , function ( $window , $document , done ) {
118
- done ( null , $window . angular . element ( $window . document ) . injector ( ) . get ( '$location' ) . search ( ) ) ;
118
+ done ( null , $document . injector ( ) . get ( '$location' ) . search ( ) ) ;
119
119
} ) ;
120
120
} ;
121
121
122
122
api . hash = function ( ) {
123
123
return this . addFutureAction ( '$location.hash()' , function ( $window , $document , done ) {
124
- done ( null , $window . angular . element ( $window . document ) . injector ( ) . get ( '$location' ) . hash ( ) ) ;
124
+ done ( null , $document . injector ( ) . get ( '$location' ) . hash ( ) ) ;
125
125
} ) ;
126
126
} ;
127
127
You can’t perform that action at this time.
0 commit comments