aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/dsl.js
diff options
context:
space:
mode:
authorMisko Hevery2011-10-17 16:56:56 -0700
committerMisko Hevery2011-11-14 16:39:31 -0800
commit48697a2b86dbb12ea8de64cc5fece7caf68b321e (patch)
tree1fa50659f0bb5de2640dea2a2e5bb5628f2bb14a /src/scenario/dsl.js
parent93b777c916ccff243c5a6080bf5f39860ac7bf39 (diff)
downloadangular.js-48697a2b86dbb12ea8de64cc5fece7caf68b321e.tar.bz2
refactor(injector): turn scope into a service
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
Diffstat (limited to 'src/scenario/dsl.js')
-rw-r--r--src/scenario/dsl.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scenario/dsl.js b/src/scenario/dsl.js
index db81dd35..13ae8b8f 100644
--- a/src/scenario/dsl.js
+++ b/src/scenario/dsl.js
@@ -103,25 +103,25 @@ angular.scenario.dsl('browser', function() {
api.url = function() {
return this.addFutureAction('$location.url()', function($window, $document, done) {
- done(null, $window.angular.scope().$service('$location').url());
+ done(null, $window.angular.injector()('$location').url());
});
};
api.path = function() {
return this.addFutureAction('$location.path()', function($window, $document, done) {
- done(null, $window.angular.scope().$service('$location').path());
+ done(null, $window.angular.injector()('$location').path());
});
};
api.search = function() {
return this.addFutureAction('$location.search()', function($window, $document, done) {
- done(null, $window.angular.scope().$service('$location').search());
+ done(null, $window.angular.injector()('$location').search());
});
};
api.hash = function() {
return this.addFutureAction('$location.hash()', function($window, $document, done) {
- done(null, $window.angular.scope().$service('$location').hash());
+ done(null, $window.angular.injector()('$location').hash());
});
};