Kayıtlar

angular 7 etiketine sahip yayınlar gösteriliyor

Angular Material Design Mat-Select Unit Test

const debugElement = fixture.debugElement; const matSelect = debugElement.query(By.css('.mat-select-trigger')).nativeElement; matSelect.click(); fixture.detechChanges(); const matOption = debugElement.query(By.css('.mat-option'))[0].nativeElement; matOption.click(); fixture.detechChanges(); fixture.whenStable().then( () => {    const inputElement: HTMLElement = debugElement.query(By.css('.ask-input')).nativeElement;    expect(inputElement.innerHTML.length).toBeGreaterThan(0); });

Deploy and config NGINX on Angular 7 + Nginx Docker

Create and run docker image docker run --name app-nginx -p 9595:80 -v /media/storage/angular7nginx-app/:/usr/share/nginx/html:ro -d nginx Go to docker image docker exec -ti app-nginx /bin/bash vim /etc/nginx/nginx.conf Add these line of code inside the http Restart docker container Check docker logs docker logs app-nginx app-nginx is application name server {     listen 80;     listen [::]:80;     server_name http://ip;     root /usr/share/nginx/html;     index index.html index.htm;     location / {         try_files $uri $uri/ /index.html; # This will allow you to refresh page in your angular app. Which will not give error 404.     } } usefull commands on docker: docker commit app-nginx nginx:latest  --> create a new docker with latest tag docker logs app-nginx -f                       ...