Code hier eingeben);
inject(function (_$injector_) {
var $injector = _$injector_;
controller = $injector.get('$controller')('PhoneController');
});
});
describe('initialization', function () {
it('creates three phones', function () {
expect(controller.phones.length).toBe(3);
});
});
});
Am Dienstag, 10. November 2015 15:35:18 UTC+1 schrieb Spo Oo:
>
> Hi there,
>
> I'm still learning angular and doing the tutorial right now...
>
> One question, I'm trying to avoid '$scope' so I'm using 'this' and '... as
> ...' syntax... How can you avoid '$scope' in the tests?
>
> Thanks,
> Spo
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.