목록Javascript/Angular (6)
낭만 프로그래머
Anuglar 와 같은 SPA 같은 경우 서버에 수정한 부분을 반영했음에도 불구하고 브라우저의 캐시 문제로 인하여 새로운 index.html 파일을 가져오지 못하여 이전 페이지가 계속 나타나는 문제가 발생한다.이런 경우에는 서버 설정에 index.html 인 경우에는 캐싱을 하지 말고 항상 가져가야 한다는 것을 정의해 놓으면 된다.참고로 몇가지 이야기 하자면 서버에 설정을 수정하여 반영했다고 해서 100% 브라우저에 바로 적용되지는 않는 것 같다. 그런 경우에는 Clinet PC를 재부팅을 해보던지 브라우저에서 애플리케이션 페이지에 접속한 후 Ctrl+Shift+R 을 눌러서 새로 가져오도록 해야 한다.* nginx.conf 파일 수정 예제...server { listen 446 ssl http2; ..
Angular로 개발 후 Deploy 하다보면 브러우저 Cache가 남아 있어서 변경된 부분이 적용되지 않는 문제가 발생하였다. 구글링 해서 찾아 보니 빌드시에 몇가지 꼼수를 쓰면 해결 되었다. 1. package.json 파일 수정 - {빌더 폴더}에 index.html이 존재하는 폴더 위치를 적는다. 아래 부분을 scripts 안의 아래쪽에 추가한다. "scripts": { ... "deploy_dev": "ng build --configuration=development --aot=true --output-hashing=all --extract-css=true && npm run add_date", "deploy_prd": "ng build --configuration=production && np..
보호되어 있는 글입니다.
[발생 에러] Error: node_modules/pdfjs-dist/types/src/display/text_layer.d.ts:119:41 - error TS2304: Cannot find name 'OffscreenCanvasRenderingContext2D'. [해결 방법] Step 1. package.json 파일 수정 - devDependencies에 "@types/offscreencanvas": "2019.7.0" 추가 "devDependencies": { "@angular-devkit/build-angular": "^14.2.9", "@angular/cli": "~14.2.9", "@angular/compiler-cli": "^14.2.0", "@types/jasmine": "~4.0.0"..
1. Atom 설치https://atom.io/ 2. angular 프로젝트 생성 ng new study 3. Atom 실행 cd study atom . 4. atom-typescript 패키지 설치- atom-typescript 로 검색 후 설치 5. linter 패키지 설치- linter 로 검색 후 설치참고 : https://github.com/steelbrain/linter 6. editorconfig 패키지 설치- editorconfig 로 검색 후 설치참고 : https://github.com/sindresorhus/atom-editorconfig 7. file-icons 패키지 설치- file-icons 로 검색 후 설치참고 : https://github.com/file-icons/atom
1. Node.js 설치http://blog.miyam.net/44 2. Angular CLI 설치 npm install -g angular-cli 3. 프로젝트 생성 ng new firstproject 4. 개발서버 시작 cd firstproject ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153 5. 운영서버 배포를 위한 빌드 ng build -> dist 폴더가 생성됨. 6. 방화벽 해제 ( 4021 Port)http://blog.miyam.net/7