Front-End
[JWT] 토큰(Token) 기반 인증에 대한 소개
https://velopert.com/2350 [JWT] 토큰(Token) 기반 인증에 대한 소개 | VELOPERT.LOG 소개 토큰(Token) 기반 인증은 모던 웹서비스에서 정말 많이 사용되고 있습니다. 여러분이 API 를 사용하는 웹서비스를 개발한다면, 토큰을 사용하여 유저들의 인증작업을 처리하는것이 가장 좋은 velopert.com
Template literals
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Template_literals test11234567891011121314151617181920212223242526272829303132 테스트 var template = ` `; //alert(a.toString());var $row = $(template.toString());$row.find(".title").text("제목11");$row.find(".content").text("내용22");$("div#test").append($row); $("div#test").empty(); var $row2 = null;for(var i=0; i
[Angular] 콜백function안에서 다른 function호출시 에러발생할때
setTimeout함수를 예시로 사용했다. 일반함수(function)는 this가 바인딩되기때문에 5,6Line의 getApprovalDetail() 호출시 에러가 발생함. (ERROR TypeError: this.getApprovalDetail is not a function) 화살표함수(Arrow Function)사용시 this가 바인딩안되서, this.getApprovalDetail()이 정상적 호출되는것을 확인 할 수 있음. 123456789101112131415161718192021222324252627// 에러발생 예제getApproval(){ setTimeout(function(){ try{ // getApprovalDetail(); // 에러발생 this.getApprovalDetail()..
angular 기초정리
파일명은 -(하이픈)과 .(점)으로 구분파일명은 camelCase방식이 아닌, -(하이픈)으로 구분하여 파일명 작성.ex) approval-list.component.ts (O) approvalListComponent.ts (X)파일내 Class명은 camelCase로 작성.(angularCLI통해서 생성하면 camelCase방식으로 생성되서 신경쓸필요없음.camelCase: backColor처럼 연결된 단어의 첫 글자는 소문자로, 이후 연결된 단어들의 첫 글자는 대문자로 표기한다.12345678@Component({ selector: 'app-approval-list', templateUrl: './approval-list.component.html', styleUrls: ['./approval-lis..
HTML5 input required, $("input:invalid") 활용
input required : 필수값여부document.querySelectorAll('input:valid') : valid input 찾기document.querySelectorAll('input:invalid') : invalid input 찾기document.forms[0].checkValidity() : 폼 내 dom들 validation체크$("input:invalid") : jquery로 invalid input 찾기(jquery invalid extend필수) html5 기능은 ie9부턴가 지원되니까, ie9이상환경 프로젝트나 모바일/태블릿프로젝트에서 활용WEB TEST : https://jsfiddle.net/ab5saeav/ 1234567891011121314151617181920212..
[Tomcat]Angular App URL접근이나 새로고침 시 404에러 뜰때.
https://stackoverflow.com/questions/46299430/deploy-angular-application-on-apache-tomcat-404-deep-links-issue 'ng build'한 후 톰켓에 빌드한 파일을 배포하였는데url로 angular에서 routing한 path를 접근하거나, 새로고침을 했을때 404에러가 발생하는 문제가 발생했다. 때문에 404에러페이지를 생성했고, 요청한 url을 분기처리하여 angular에 접근하려는경우 angularApp에 해당접근path를 파라메터로 던지도록 했다.접근path를 넘겨받은 angularApp에서는 라우팅처리를 하도록 하여, 페이지에 정상 접근하도록 설정했다. web.xml 12345 404 /common/error.jspc..
[Angular] Error: Cannot find module '@angular-devkit/core'에러
cmd에서 ng new를 통하여 project생성 후ng serve명령어를 날렸더니 발생한 Error: Cannot find module '@angular-devkit/core' 에러. node_modules/@angular-devkit 경로에 가보니 core폴더가 생성되지 않았다. npm install @angular-devkit/core --save-dev 명령어 호출 후 다시 ng serve를 했더니 해결되었음. 123456789101112131415161718192021222324252627282930313233343536373839C:\workspace\jersey\src\main\angular-board>ng servemodule.js:540 throw err; ^ Error: Cannot f..