How to use scope variables with the “Controller as” syntax in Jasmine?
问题 I'm using jasmine for angularJS testing. In my views, I'm using the "Controller as" syntax: <div ng-controller="configCtrl as config"> <div> {{ config.status }} </div> </div> How can I use these "scope" variables in jasmine? What does the "Controller as" refer to? My test looks like following: describe('ConfigCtrl', function(){ var scope; beforeEach(angular.mock.module('busybee')); beforeEach(angular.mock.inject(function($rootScope){ scope = $rootScope.$new(); $controller('configCtrl', {