Skip to content

Instantly share code, notes, and snippets.

@sungjaeHong
Last active September 6, 2016 01:52
Show Gist options
  • Save sungjaeHong/856f6643e33f9955061afb9bd6c7a16a to your computer and use it in GitHub Desktop.
Save sungjaeHong/856f6643e33f9955061afb9bd6c7a16a to your computer and use it in GitHub Desktop.

Angular CLI

  • 아직 베타버전이라 너무 바뀌는 점이 많음.
  • ES6, TypeScript, Dart가 컴파일을 지원.
  • TypeScript, Dart가 type을 지원.
  • Dart는 js가 아니다.

새 프로젝트 만들기

  1. ng new angular-sample(angular-sample이란 폴더를 만들고 angular를 셋팅한다)
  2. download 되면 angular-cli.json에 설정을 한다.
  3. 자동으로 git init이 되어, commit하게 되면 형상관리 셋팅이 완료된다.
  4. ng serve (서버를 동작시킨다 )
  5. index.html에 javascript를 사용하는 부분이 없으나 webpack에서 자동으로 넣어줌
  6. "angular js"는 typescript를 기본으로 사용함
  7. ng serve 후 에러가 나면 typescript verson을 2.0으로 fix해주어야함.
  8. main.ts에 script 를 import할 수 있다.

###웹 프레임워크의 발전 jquery -> ext js, dojo -> backbone.js, angular js -> React, angular js 2.0 Library -> Feature-Complete Framework -> MVC -> Component

Component란? 레고의 조각들처럼 하나의 블럭이 컴포넌트가 될 수 있고 여러개가 합쳐진 것도 컴포넌트라고 볼수있다. form과 input태그들 또한 컴포넌트로 볼 수 있다.

  • Class - Logic
  • Components - View

###Reactive Programming

  • 프로그램 패러다임
  • 비동기 데이터 스트림을 가지고 하는 프로그래밍
  • 프론트엔드에선 주로 Observable
  • 왜 Reactive Programming을 하는가 비동기는 어렵다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment