본문 바로가기

분류 전체보기

(123)
[ES6] use strict use strict ES5에서 사용 strict 모드의 제한 1. 선언하지 않고 변수를 사용할 때. "use strict"; x = 3.14; //선언하지 않고 사용하여 오류 2. 변수,함수,매개변수를 삭제하려할 때 "use strict"; x = 3.14; delete x; //삭제 안됨 3. 동일한 프로퍼티를 한번 이상 선언하려 할 때 "use strict"; var x = { p1 : 10, p1 : 20}; //오류 4. 매개변수 이름이 동일할 때 "use strict"; function x(p1, p1) {}; //오류 5. 8진법의 숫자 리터럴 과 특수문자를 할당하려 할 때 "use strict"; var x = 010; //오류 var x = /010; //오류 6. 읽기전용에 할당하려 할 ..
[ES6] ECMAScript 2015 정식 명칭ECMAScript 2015 Language Spec 스펙 약칭ES6 : ES2015ES7 : ES2016 Built-in 오브젝트Function, Object, Array 등 인스턴스new 생성자 함수로 생성 ES6 방향성함수형 언어 : ES5 주된 형태객체지향 언어 : ES6의 주된 방향 ES6 특징new 연산자로 인스턴스 생성다른 언어의 장점 적용언어적 기본 기능보다 활용에 중점메모리 사용의 최적화 도모다른 언어의 데이터와 인터페이스
inline-block 속성 요소를 연속 사용하는 경우, 좌우에 정의하지 않은 space(4px)가 자동 지정되는 현상의 해결 방안 https://css-tricks.com/fighting-the-space-between-inline-block-elements/
CSS만으로 가변영역 / 고정영역 Column 레이아웃을 구현하는 방법 http://rwdb.kr/columnlayout/
[Ionic] sidemenu 앱에서 페이지 추가하기 pages > action-sheet 추가 action-sheet.html Action Sheet Page Hello Ionic! action-sheet.ts import { NavController } from 'ionic-angular'; @Component({ templateUrl: 'action-sheet.html' }) export class ActionSheetPage { constructor(public navCtrl: NavController) { } } app.component.ts import { ActionSheetPage } from '../pages/action-sheet/action-sheet'; constructor(public platform: Platform, public ..
[Ionic] 프로젝트 만들기 $ ionic start --v2 componentsDocApp sidemenu $ cd componentsDocApp $ ionic serve -c -l
callback, popup callback 넘길 수 있는 실행가능한 코드 조각 원하는 시간이나 조건에 그 코드 조각이 실행되기 원할때 var callback = function() { alert('callback was executed!'); } setTimeout(callback, 5000); setTimeout(function(){ alert('callback was executed!'); }, 5000); popup alert('hello world'); prompt('hello world'); confirm('hello world'); //advanced popup console.log(prompt('What\'s your name?')); if (confirm('Pop-up another one?')) { alert('P..
class class = 실제 세계의 물체를 표한하는데 사용 정보(변수)와 행동(함수) 인터페이스와 차이점 constructor 함수의 내용이 꼭 있어야한다 class class Point { x: number; constructor(x: number, public y: number = 0) { this.x = x; } dist() { return Math.sqrt(this.x * this.x + this.y * this.y); } static origin = new Point(0, 0); } var point1 = new Point(10, 20); var point2 = new Point(25); Interface interface Point { x: number; y: number; dist(): number;..