1
에서 각도 수정 나는 다음 각 컨트롤러 Players
는 angular.value() 제공 업체 인각도기
....
.controller('EndCtrl', ['$scope', '$location', 'Players', function($scope, $location, Players) {
console.log('players', Players);
$scope.players = Players;
$scope.go = function (path) {
Players = [];
$location.path(path);
};
}]);
에게 있습니다. 내가 아무것도 페이지 따라서
에서 발생하기 전에 Players
을 설정해야 각도기 테스트를 실행하기 위해 노력하고있어
.... 그러나
.....
beforeEach(function(){
browser.get('#/end');
browser.waitForAngular();
browser.executeScript(function(json) {
var mod = angular.module('myApp.players');
mod.run(['Players', function(Players){
Players = [json.characters[0], json.characters[1]];
console.log(Players, 'player browser');
}]);
console.log('player browser', mod);
}, json);
});
는 테스트를 실행에 보인다 사실 이후에 처형된다. 내가 컨트롤러가 실행되기 전에 값을 설정해야
....
'browser.waitForAngular();를'mod.run()'명령 다음으로 옮겨보십시오. –