Angular 썸네일형 리스트형 [Angular7] e2e Test [Angular7] e2e //Input Tag에 abc 입력 후 value 값이 동일한지 확인 it('some test', async () => { const input1 = element(by.id('input1')); await input1.sendKeys('abc'); expect(await input1.getAttribute('value')).toEqual('abc'); }); 더보기 [Angular2+] ng serve 호스트, 포트 지정하여 실행하기 ng serve로 실행 시 localhost:4200 default 로 실행된다. 외부에서 접속 가능하게 하려면 host를 지정하면 된다. ng serve --host XXX.XXX.XXX.XXX --port 8080 아래 사이트 참고https://cli.angular.io/https://github.com/angular/angular-cli/wiki/serve 더보기 [angular] angular-in-memory-web-api 모듈 설치 npm install angular-in-memory-web-api --save hero tutorial HTTP 예제getHeroes(): Promise { return this.http.get(this.heroesUrl) .toPromise() .then(response => response.json().data as Hero[]) .catch(this.handleError);}response.json() 로 해서 heroes 가 출력됨. 더보기 이전 1 다음