Angular: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
 
Line 32: Line 32:


== ETC ==
== ETC ==
=== too many file notify ===
간혹 파일들이 많은 경우, 자동 서버 재시작이 되지 않는 경우가 있다. 이런 경우 설정값을 올려주면 된다.
간혹 파일들이 많은 경우, 자동 서버 재시작이 되지 않는 경우가 있다. 이런 경우 설정값을 올려주면 된다.
<pre>
<pre>
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
</pre>


=== https enable ===
https(ssl) 설정을 하기 위해서는 다음의 옵션을 사용하면 된다.
<pre>
--ssl (Boolean) (Default: false)
--ssl-key (String) (Default: ssl/server.key)
--ssl-cert (String) (Default: ssl/server.crt)
</pre>
</pre>
<source lang=bash>
$ sudo ng serve ng serve --ssl 1 --ssl-key "/etc/asterisk/keys/asterisk.key" --ssl-cert "/etc/asterisk/keys/asterisk.crt"
</source>


== Tutorial ==
== Tutorial ==

Latest revision as of 14:22, 16 February 2018

Overview

Angular 내용 정리.

Installation

<source lang=bash> $ npm install -g @angular/cli </source>

Basics

Augular is a framework for building client applications in HTML, CSS, and JavaScript / TypeScript.

  • Gives our applications a clean structure.
  • Includes a lot of re-usable code.
  • Makes our applications more testable.

Component

Encapsulates the template, data and the behavior of a view.

* Create a component.
* Register it in a module.
* Add an element in an HTML markup.

Directive

To modify DOM elements and/or extend their behavior.

Observable

Observable은 Angular 에서 사용되는 객체로(자바 스크립트 객체가 아님) 일반적으로 다음과 같은 형태로 사용된다. <source lang=javascript> observable_return_function.subscribe() </source> observable_return_function 에 의해 정의된 특정 조건이 갖춰지면 observable 이 생성되고, .subscribe 를 통해 observable 함수가 실행된다.

ETC

too many file notify

간혹 파일들이 많은 경우, 자동 서버 재시작이 되지 않는 경우가 있다. 이런 경우 설정값을 올려주면 된다.

$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

https enable

https(ssl) 설정을 하기 위해서는 다음의 옵션을 사용하면 된다.

--ssl (Boolean) (Default: false)
--ssl-key (String) (Default: ssl/server.key)
--ssl-cert (String) (Default: ssl/server.crt)

<source lang=bash> $ sudo ng serve ng serve --ssl 1 --ssl-key "/etc/asterisk/keys/asterisk.key" --ssl-cert "/etc/asterisk/keys/asterisk.crt" </source>

Tutorial