본문 바로가기

프론트기술27

IntelliJ에서 Angular2 사용하기 with Angular CLI 주변에 보면 Angular 를 하고는 싶으나 진입이 어렵다고들 하십니다. 타입스크립트 ES6 등등 처음 접해보는 개념들과 용어들, 그리고 처음에 뭔가 셋팅이 많이 필요해서 일지도 모릅니다. (보통 AngularJS 1.x 는 AngularJS로 Angular2.x이후는 Angular로 불립니다.) Angular-CLI 를 이용하면 Angular2 프로젝트 초기 셋팅에 들어가는 수고를 덜 수 있습니다. 따라서 처음에는 Angular CLI 로 시작해보시길 권장합니다 https://github.com/angular/angular-cli 1. NPM을 이용해서 angular-cli 를 설치 npm install -g angular-cli *npm 이 없으시다면, NODE js를 설치하세요 2. Angular .. 2016. 12. 28.
45 useful javascript tips 1 – Don’t forget var keyword when assigning a variable’s value for the first time.Assignment to an undeclared variable automatically results in a global variable being created. Avoid global variables.2 – use === instead of ==The == (or !=) operator performs an automatic type conversion if needed. The === (or !==) operator will not perform any conversion. It compares the value and the type, which.. 2015. 3. 30.
HTML5 기본 Layout Template index.html header nav contents Rev Factory style.css html,body { padding: 0; margin: 0; text-align: center; height: 100%; } body { font-size: 12px; font-family: "돋음",dotum,sans-serif; color: #333; } #Head { position: relative; width: 100%; height: 50px; overflow: hidden; z-index: 10; background-color: #eee; } #bodyWrap { width: 100%; min-height: 100%; margin: -50px auto -30px; background-color: .. 2015. 3. 18.
Javascript 옵저버 패턴 var Users = { list: [], listeners: {}, add: function(name) { this.list.push({name: name}); this.dispatch("user-added"); }, on: function(eventName, listener) { if(!this.listeners[eventName]) this.listeners[eventName] = []; this.listeners[eventName].push(listener); }, dispatch: function(eventName) { if(this.listeners[eventName]) { for(var i=0; i 2014. 11. 18.
javascript 이미지 크기 불러오기 비동기로 이미지 불러오는 소스 $j("").attr("src", thumbnailUrl).load(function() {console.log(this.width);console.log(this.height);}); http://stackoverflow.com/questions/318630/get-real-image-width-and-height-with-javascript-in-safari-chrome 2014. 11. 18.
Json - Object 간 변환 JSON-> Object JSON.parse(posStr); Object -> JSON JSON.stringify( info ) 2013. 5. 28.