We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2cdb0 commit e295eeeCopy full SHA for e295eee
1 file changed
test/ng/controllerSpec.js
@@ -90,6 +90,18 @@ describe('$controller', function() {
90
});
91
92
93
+ it('should instantiate controller defined on window', inject(function($window) {
94
+ var scope = {};
95
+ var Foo = function() {};
96
+
97
+ $window.a = {Foo: Foo};
98
99
+ var foo = $controller('a.Foo', {$scope: scope});
100
+ expect(foo).toBeDefined();
101
+ expect(foo instanceof Foo).toBe(true);
102
+ }));
103
104
105
describe('ctrl as syntax', function() {
106
107
it('should publish controller instance into scope', function() {
0 commit comments