SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
준비하세요 
AngularJS 2.0
+jeado.ko 
haibane84@gmail.com
현재 버젼 
AngularJS 1.3
Motivation for AngularJS 2.0 
● 성능 
● 웹의 변화 
● 쓰기 편함
성능 
최초 AngularJS는 디자이너를 위해 만들어 졌 
다.
웹의 변화 
ES6 
Web Components 
● Custom Elements 
● HTML Imports 
● Template Element 
● Shadow Dom
쓰기 어려움 
출처 http://www.bennadel.com/blog/2439-my-experience-with-angularjs- 
the-super-heroic-javascript-mvw-framework.htm
AngularJS 2.0의 새로운 기능
AtScript
AtScript? 
언어를 만드는거냐? 
더 어렵게 만들려는 수작이야?
module.directive('blink', 
['$timeout', function($timeout) { 
return { 
require: 'options', 
restrict: 'A', 
link: function(_,element,__,options){ 
var selectors = someThirdPartyAPI(); 
element.query(selectors.join(',')) 
.forEach(e => options.apply(e)); 
} 
}; 
}]);
module.directive('blink', 
['$timeout', function($timeout) { 
return { 
require: 'options', 
restrict: 'A', 
link: function(_,element,__,options){ 
var selectors = someThirdPartyAPI(); 
element.query(selectors.join(',')) 
.forEach(e => options.apply(e)); 
} 
}; 
}]);
module.directive('blink', 
['$timeout', function($timeout) { 
return { 
require: 'options', 
restrict: 'A', 
link: function(_,element,__,options){ 
var selectors = someThirdPartyAPI(); 
element.query(selectors.join(',')) 
.forEach(e => options.apply(e)); 
} 
}; 
}]); 
Array<CssSelectors> 
Element
@Directive({ 
selector: ['[blink]'] 
}) 
class Blink { 
constructor(element:Element, 
options:Options, 
timeout:Timeout) { 
var selectors:Array<CssSelectors> = 
someThirdPartyAPI(); 
element.query(selectors.join(',')) 
.forEach(e => options.apply(e)); 
} 
}
Ideal Development Environment 
Optional Metadata 
Types 
AtScript 
Introspection
ES3 '99 
- try/catch 
- RegExp 
ES4 '07 
- Types 
- Classes 
- Modules 
- (other) 
ES5 '09 
- strict mode 
ES6 '15 
- Classes 
- Modules 
- (other) 
ES? '?? 
- Types 
- Annotation 
- Introspection
AtScript 
- Annotations 
- Introspection 
TypeScript 
- Types 
ES6 
- classes 
- modules 
ES5
ES5 
function Blink(element, 
options, 
timeout) { 
} 
Blink.annotations = [ 
new Directive({selector: '[blink]'})]; 
Blink.parameters = [ 
Element, Options, Timeout];
ES6 
class Blink { 
constructor(element, 
options, 
timeout) { 
} 
} 
Blink.annotations = [ 
new Directive({selector: '[blink]'})]; 
Blink.parameters = [ 
Element, Options, Timeout];
TypeScript 
class Blink { 
public static annotations = [ 
new Directive({selector: '[blink]'})]; 
public static parameters = [ 
Element, Options, Timeout]; 
constructor(element:Element, 
options:Options, 
timeout:Timeout) { } 
}
AtScript 
@Directive({ 
selector: '[blink]' 
}) 
class Blink { 
constructor(element:Element, 
options:Options, 
timeout:Timeout) { 
} 
}
CoffeeScript 
class Blink { 
@annotations = [ 
new Directive({selector: '[blink]'})]; 
@parameters = [ 
Element, Options, Timeout]; 
constructor: (element, options, timeout){ 
} 
}
AtScript != new language 
AtScript = ES6 
+ Types 
+ Annotations 
+ Introspections
Template
AngularJS 1.3 
<div ng-controller="SantaTodoController"> 
<input type="text" ng-model="newTodoTitle"> 
<button ng-click="addTodo()">+</button> 
<tab-container> 
<tab-pane title="Tobias"> 
<div ng-repeat="todo in todosOf('tobias')"> 
<input type="checkbox" 
ng-model="todo.done"> 
{{todo.title}} 
<button ng-click="deleteTodo(todo)"> 
X 
</button> 
</div> 
</tab-pane> 
...
AngularJS 2.0 
<div> 
<input type="text" [value]="newTodoTitle"> 
<button (click)="addTodo()">+</buton> 
<tab-container> 
<tab-pane title="Good kids"> 
<div [ng-repeat|todo]="todosOf('good')"> 
<input type="checkbox" 
[checked]="todo.done"> 
{{todo.title}} 
<button (click)="deleteTodo(todo)"> 
X 
</button> 
</div> 
</tab-pane> 
...
Event binding 
<button (click)="doSomething()">click me</button> 
<div (^click)="doSomithing"> 
<img src="..."><span>text</span> 
</div> 
<zippy #zippy title="Greeting"> 
Body of the text which is shown conditionally. 
<a href (hover)="zippy.close()">hover to close</a>. 
</zippy> 
<button (click)="zippy.toggle()">toggle</button>
AngularJS 2.0 
<div> 
<input type="text" [value]="newTodoTitle"> 
<button (click)="addTodo()">+</buton> 
<tab-container> 
<tab-pane title="Good kids"> 
<div [ng-repeat|todo]="todosOf('good')"> 
<input type="checkbox" 
[checked]="todo.done"> 
{{todo.title}} 
<button (click)="deleteTodo(todo)"> 
X 
</button> 
</div> 
</tab-pane> 
...
Property binding 
<div [property-name]="expression"> 
<div [ng-repeat|person]="people"> 
<span [text]="person.name"></span> 
</div>
AngularJS 2.0 
<div> 
<input type="text" [value]="newTodoTitle"> 
<button (click)="addTodo()">+</buton> 
<tab-container> 
<tab-pane title="Good kids"> 
<div [ng-repeat|todo]="todosOf('good')"> 
<input type="checkbox" 
[checked]="todo.done"> 
{{todo.title}} 
<button (click)="deleteTodo(todo)"> 
X 
</button> 
</div> 
</tab-pane> 
...
AngularJS 2.0 
<div> 
<input type="text" [value]="newTodoTitle"> 
<button (click)="addTodo()">+</buton> 
<tab-container> 
<tab-pane title="Good kids"> 
<div [ng-repeat|todo]="todosOf('good')"> 
<input type="checkbox" 
[checked]="todo.done"> 
{{todo.title}} 
<button (click)="deleteTodo(todo)"> 
X 
</button> 
</div> 
</tab-pane> 
...
Databinding 
Databinding to 
Element`s properties 
not to 
Element`s attributes 
<elm attr=”...”> elm.property=...
Controller
controllers 
2009-2014
Components 
= Building block 
(LEGO)
<ng-search-icon> 
<ng-paper-fab> 
<ng-drawer-panel> 
<ng-field>
Directive Definition Object ("DDO") 
myModule.directive('directiveName', function factory(injectables) { 
return { 
priority: 0, 
template: '<div></div>', // or // function(tElement, tAttrs) { ... }, 
// or 
// templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... }, 
transclude: false, 
restrict: 'A', 
templateNamespace: 'html', 
scope: false, 
controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... 
}, 
controllerAs: 'stringAlias', 
require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '? 
optionalDirectiveName', '?^optionalParent'], 
compile: function compile(tElement, tAttrs, transclude) { 
return { 
pre: function preLink(scope, iElement, iAttrs, controller) { ... }, 
post: function postLink(scope, iElement, iAttrs, controller) { ... } 
} 
// or 
// return function postLink( ... ) { ... }
Component = Directive … 
그 지저분한 Directive 만 가지고 
만들라고?
Directive
DDO 
2009-2014
SantaTodoApp component 
@ComponentDirective 
class SantaTodoApp { 
constructor() { 
this.newTodoTitle = ''; 
} 
addTodo: function() { ... } 
removeTodo: function(todo) { ... } 
todosOf: function(filter) { ... } 
}
SantaTodoApp component 
@ComponentDirective({ ... }) 
class SantaTodoApp { ... } 
@TemplateDirective({ ... }) 
class NgRepeat { ... } 
@DecoratorDirective({ ... }) 
class NgClass { ... }
SantaTodoApp component 
@ComponentDirective 
class SantaTodoApp { 
constructor() { 
this.newTodoTitle = ''; 
} 
addTodo: function() { ... } 
removeTodo: function(todo) { ... } 
todosOf: function(filter) { ... } 
}
어? $scope 은 어딨지?
$scope 
2009-2014
Component is the execution 
context for the template 
컴포넌트의 모든 속성과 메소 
드는 템플릿에서 사용할 수 있 
다.
Dependency Injection
Defining services 
class TodoStore { 
constructor(win:Window) { 
this.win = win; 
} 
add(todo) { 
// access this.win.localStorage ... 
} 
remove(todo) { ... } 
todosOf(filter) { ... } 
}
angular 
.module 
2009-2014
Using services 
import {TodoStore} from './store'; 
@ComponentDirective({ 
directives: [TabContainer, TabPane, NgRepeat] 
}) 
class SantaTodoApp { 
constructor(store:TodoStore) { 
... 
} 
... 
}
Directives and DI 
<tab-container> 
<tab-pane title="Tobias"> 
New Macbook Pro 
Tesla Model X 
... 
</tab-pane> 
<tab-pane title="Good kids"> 
... 
</tab-pane> 
<tab-pane title="Bad kids"> 
... 
</tab-pane> 
</tab-container>
Directives and DI 
class TabPane { 
constructor( 
tabContainer:TabContainer, 
element:HTMLElement 
) { ... } 
... 
} 
class TabContainer { 
constructor(tabs:Query<TabPane>) { ... } 
... 
}
요약 
사망 : Controller, $scope, DDO, Module, jqLite 
출생 : AtScript, Web Component 지원, more? 
다이어트를 했다?
Angular 2.0 Source 
https://github.com/angular/angular
reference 
Angular 2.0 Core by Igor Minar & Tobias Bosch at ng-europe 2014(Youtube) 
Miško Hevery - Keynote on AtScript at ng-europe 2014 (Youtube) 
Angular v2 Template Syntax Summary (Google Doc) 
Databinding with Web Components (Google Doc)

Más contenido relacionado

La actualidad más candente

Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJSWei Ru
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architectureMichael He
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introductionLuigi De Russis
 
Modules and injector
Modules and injectorModules and injector
Modules and injectorEyal Vardi
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xEyal Vardi
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.Yan Yankowski
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationEyal Vardi
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IVisual Engineering
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2Eyal Vardi
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 

La actualidad más candente (20)

AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
 
AngularJs
AngularJsAngularJs
AngularJs
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 
Angularjs architecture
Angularjs architectureAngularjs architecture
Angularjs architecture
 
AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Modules and injector
Modules and injectorModules and injector
Modules and injector
 
Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)Angular js architecture (v1.4.8)
Angular js architecture (v1.4.8)
 
Upgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.xUpgrading from Angular 1.x to Angular 2.x
Upgrading from Angular 1.x to Angular 2.x
 
AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.AngularJs $provide API internals & circular dependency problem.
AngularJs $provide API internals & circular dependency problem.
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
AngularJS
AngularJSAngularJS
AngularJS
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2
 
Nicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JSNicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JS
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 

Destacado

Angularjs 도입 선택 가이드
Angularjs 도입 선택 가이드Angularjs 도입 선택 가이드
Angularjs 도입 선택 가이드NAVER D2
 
AngularJS 2, version 1 and ReactJS
AngularJS 2, version 1 and ReactJSAngularJS 2, version 1 and ReactJS
AngularJS 2, version 1 and ReactJSKenneth Ceyer
 
Front end dev 2016 & beyond
Front end dev 2016 & beyondFront end dev 2016 & beyond
Front end dev 2016 & beyondJae Sung Park
 
Angular 2 어디까지 왔을까
Angular 2 어디까지 왔을까Angular 2 어디까지 왔을까
Angular 2 어디까지 왔을까장현 한
 
Angular2를 활용한 컴포넌트 중심의 개발
Angular2를 활용한 컴포넌트 중심의 개발Angular2를 활용한 컴포넌트 중심의 개발
Angular2를 활용한 컴포넌트 중심의 개발Jin wook
 
Angular js 2.0 preview
Angular js 2.0 previewAngular js 2.0 preview
Angular js 2.0 preview학섭 오
 
Angular2 가기전 Type script소개
 Angular2 가기전 Type script소개 Angular2 가기전 Type script소개
Angular2 가기전 Type script소개Dong Jun Kwon
 
How to make beer in House
How to make beer in HouseHow to make beer in House
How to make beer in HouseChan-uk Son
 
ECMAScript 6의 새로운 것들!
ECMAScript 6의 새로운 것들!ECMAScript 6의 새로운 것들!
ECMAScript 6의 새로운 것들!WooYoung Cho
 
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...The role of Payroll is preparation and processing of Auto Enrolment - Sage at...
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...Sageukofficial
 
Electronics bits
Electronics bitsElectronics bits
Electronics bitsDr.YNM
 
Ett lyft för skolbiblioteket 110407 i Tammerfors
Ett lyft för skolbiblioteket 110407 i TammerforsEtt lyft för skolbiblioteket 110407 i Tammerfors
Ett lyft för skolbiblioteket 110407 i TammerforsStockholms stad
 
U Clubsocialmedifinal
U ClubsocialmedifinalU Clubsocialmedifinal
U ClubsocialmedifinalSarah Durham
 
Fail to prepare - Softworld 2011
Fail to prepare -  Softworld 2011Fail to prepare -  Softworld 2011
Fail to prepare - Softworld 2011Sageukofficial
 
Does the Internet harm children's health? A critical review of the evidence
Does the Internet harm children's health? A critical review of the evidenceDoes the Internet harm children's health? A critical review of the evidence
Does the Internet harm children's health? A critical review of the evidenceMonica Bulger
 
Bren Poster Presentation Workshop
Bren Poster Presentation WorkshopBren Poster Presentation Workshop
Bren Poster Presentation WorkshopMonica Bulger
 
CREATE 0708 Intro
CREATE 0708 IntroCREATE 0708 Intro
CREATE 0708 Intronewgnij
 

Destacado (20)

Angularjs 도입 선택 가이드
Angularjs 도입 선택 가이드Angularjs 도입 선택 가이드
Angularjs 도입 선택 가이드
 
AngularJS 2, version 1 and ReactJS
AngularJS 2, version 1 and ReactJSAngularJS 2, version 1 and ReactJS
AngularJS 2, version 1 and ReactJS
 
Front end dev 2016 & beyond
Front end dev 2016 & beyondFront end dev 2016 & beyond
Front end dev 2016 & beyond
 
Angular 2 어디까지 왔을까
Angular 2 어디까지 왔을까Angular 2 어디까지 왔을까
Angular 2 어디까지 왔을까
 
현실적 PWA
현실적 PWA현실적 PWA
현실적 PWA
 
Angular2를 활용한 컴포넌트 중심의 개발
Angular2를 활용한 컴포넌트 중심의 개발Angular2를 활용한 컴포넌트 중심의 개발
Angular2를 활용한 컴포넌트 중심의 개발
 
Angular js 2.0 preview
Angular js 2.0 previewAngular js 2.0 preview
Angular js 2.0 preview
 
Angular2 가기전 Type script소개
 Angular2 가기전 Type script소개 Angular2 가기전 Type script소개
Angular2 가기전 Type script소개
 
How to make beer in House
How to make beer in HouseHow to make beer in House
How to make beer in House
 
ECMAScript 6의 새로운 것들!
ECMAScript 6의 새로운 것들!ECMAScript 6의 새로운 것들!
ECMAScript 6의 새로운 것들!
 
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...The role of Payroll is preparation and processing of Auto Enrolment - Sage at...
The role of Payroll is preparation and processing of Auto Enrolment - Sage at...
 
Líderes Mundiais no Instagram
Líderes Mundiais no InstagramLíderes Mundiais no Instagram
Líderes Mundiais no Instagram
 
Ontdekmedia presentatie
Ontdekmedia presentatie Ontdekmedia presentatie
Ontdekmedia presentatie
 
Electronics bits
Electronics bitsElectronics bits
Electronics bits
 
Ett lyft för skolbiblioteket 110407 i Tammerfors
Ett lyft för skolbiblioteket 110407 i TammerforsEtt lyft för skolbiblioteket 110407 i Tammerfors
Ett lyft för skolbiblioteket 110407 i Tammerfors
 
U Clubsocialmedifinal
U ClubsocialmedifinalU Clubsocialmedifinal
U Clubsocialmedifinal
 
Fail to prepare - Softworld 2011
Fail to prepare -  Softworld 2011Fail to prepare -  Softworld 2011
Fail to prepare - Softworld 2011
 
Does the Internet harm children's health? A critical review of the evidence
Does the Internet harm children's health? A critical review of the evidenceDoes the Internet harm children's health? A critical review of the evidence
Does the Internet harm children's health? A critical review of the evidence
 
Bren Poster Presentation Workshop
Bren Poster Presentation WorkshopBren Poster Presentation Workshop
Bren Poster Presentation Workshop
 
CREATE 0708 Intro
CREATE 0708 IntroCREATE 0708 Intro
CREATE 0708 Intro
 

Similar a 준비하세요 Angular js 2.0

How to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI ComponentsHow to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI Componentscagataycivici
 
Angular js 2.0, ng poznań 20.11
Angular js 2.0, ng poznań 20.11Angular js 2.0, ng poznań 20.11
Angular js 2.0, ng poznań 20.11Kamil Augustynowicz
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Eyal Vardi
 
Reactive Type-safe WebComponents
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponentsMartin Hochel
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 WebFrameworks
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsLudmila Nesvitiy
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsEPAM Systems
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Ontico
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 
angular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdfangular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdfNuttavutThongjor1
 
Hidden Docs in Angular
Hidden Docs in AngularHidden Docs in Angular
Hidden Docs in AngularYadong Xie
 
Angular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app exampleAngular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app exampleAlexey Frolov
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJSEdi Santoso
 
Angular JS deep dive
Angular JS deep diveAngular JS deep dive
Angular JS deep diveAxilis
 
Gutenberg sous le capot, modules réutilisables
Gutenberg sous le capot, modules réutilisablesGutenberg sous le capot, modules réutilisables
Gutenberg sous le capot, modules réutilisablesRiad Benguella
 
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)Fabio Biondi
 

Similar a 준비하세요 Angular js 2.0 (20)

How to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI ComponentsHow to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI Components
 
Angular js 2.0, ng poznań 20.11
Angular js 2.0, ng poznań 20.11Angular js 2.0, ng poznań 20.11
Angular js 2.0, ng poznań 20.11
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
 
Reactive Type-safe WebComponents
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponents
 
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점 Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
Angular를 활용한 웹 프론트단 개발과 2.0에서 달라진점
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Angular 2.0 - What to expect
Angular 2.0 - What to expectAngular 2.0 - What to expect
Angular 2.0 - What to expect
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
angular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdfangular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdf
 
Hidden Docs in Angular
Hidden Docs in AngularHidden Docs in Angular
Hidden Docs in Angular
 
Get AngularJS Started!
Get AngularJS Started!Get AngularJS Started!
Get AngularJS Started!
 
Angular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app exampleAngular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app example
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJS
 
Angular2 + rxjs
Angular2 + rxjsAngular2 + rxjs
Angular2 + rxjs
 
Angular JS deep dive
Angular JS deep diveAngular JS deep dive
Angular JS deep dive
 
Gutenberg sous le capot, modules réutilisables
Gutenberg sous le capot, modules réutilisablesGutenberg sous le capot, modules réutilisables
Gutenberg sous le capot, modules réutilisables
 
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)
 

Último

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Último (20)

DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

준비하세요 Angular js 2.0

  • 4. Motivation for AngularJS 2.0 ● 성능 ● 웹의 변화 ● 쓰기 편함
  • 5. 성능 최초 AngularJS는 디자이너를 위해 만들어 졌 다.
  • 6. 웹의 변화 ES6 Web Components ● Custom Elements ● HTML Imports ● Template Element ● Shadow Dom
  • 7. 쓰기 어려움 출처 http://www.bennadel.com/blog/2439-my-experience-with-angularjs- the-super-heroic-javascript-mvw-framework.htm
  • 10. AtScript? 언어를 만드는거냐? 더 어렵게 만들려는 수작이야?
  • 11.
  • 12. module.directive('blink', ['$timeout', function($timeout) { return { require: 'options', restrict: 'A', link: function(_,element,__,options){ var selectors = someThirdPartyAPI(); element.query(selectors.join(',')) .forEach(e => options.apply(e)); } }; }]);
  • 13. module.directive('blink', ['$timeout', function($timeout) { return { require: 'options', restrict: 'A', link: function(_,element,__,options){ var selectors = someThirdPartyAPI(); element.query(selectors.join(',')) .forEach(e => options.apply(e)); } }; }]);
  • 14. module.directive('blink', ['$timeout', function($timeout) { return { require: 'options', restrict: 'A', link: function(_,element,__,options){ var selectors = someThirdPartyAPI(); element.query(selectors.join(',')) .forEach(e => options.apply(e)); } }; }]); Array<CssSelectors> Element
  • 15. @Directive({ selector: ['[blink]'] }) class Blink { constructor(element:Element, options:Options, timeout:Timeout) { var selectors:Array<CssSelectors> = someThirdPartyAPI(); element.query(selectors.join(',')) .forEach(e => options.apply(e)); } }
  • 16. Ideal Development Environment Optional Metadata Types AtScript Introspection
  • 17. ES3 '99 - try/catch - RegExp ES4 '07 - Types - Classes - Modules - (other) ES5 '09 - strict mode ES6 '15 - Classes - Modules - (other) ES? '?? - Types - Annotation - Introspection
  • 18. AtScript - Annotations - Introspection TypeScript - Types ES6 - classes - modules ES5
  • 19. ES5 function Blink(element, options, timeout) { } Blink.annotations = [ new Directive({selector: '[blink]'})]; Blink.parameters = [ Element, Options, Timeout];
  • 20. ES6 class Blink { constructor(element, options, timeout) { } } Blink.annotations = [ new Directive({selector: '[blink]'})]; Blink.parameters = [ Element, Options, Timeout];
  • 21. TypeScript class Blink { public static annotations = [ new Directive({selector: '[blink]'})]; public static parameters = [ Element, Options, Timeout]; constructor(element:Element, options:Options, timeout:Timeout) { } }
  • 22. AtScript @Directive({ selector: '[blink]' }) class Blink { constructor(element:Element, options:Options, timeout:Timeout) { } }
  • 23. CoffeeScript class Blink { @annotations = [ new Directive({selector: '[blink]'})]; @parameters = [ Element, Options, Timeout]; constructor: (element, options, timeout){ } }
  • 24. AtScript != new language AtScript = ES6 + Types + Annotations + Introspections
  • 26.
  • 27. AngularJS 1.3 <div ng-controller="SantaTodoController"> <input type="text" ng-model="newTodoTitle"> <button ng-click="addTodo()">+</button> <tab-container> <tab-pane title="Tobias"> <div ng-repeat="todo in todosOf('tobias')"> <input type="checkbox" ng-model="todo.done"> {{todo.title}} <button ng-click="deleteTodo(todo)"> X </button> </div> </tab-pane> ...
  • 28. AngularJS 2.0 <div> <input type="text" [value]="newTodoTitle"> <button (click)="addTodo()">+</buton> <tab-container> <tab-pane title="Good kids"> <div [ng-repeat|todo]="todosOf('good')"> <input type="checkbox" [checked]="todo.done"> {{todo.title}} <button (click)="deleteTodo(todo)"> X </button> </div> </tab-pane> ...
  • 29. Event binding <button (click)="doSomething()">click me</button> <div (^click)="doSomithing"> <img src="..."><span>text</span> </div> <zippy #zippy title="Greeting"> Body of the text which is shown conditionally. <a href (hover)="zippy.close()">hover to close</a>. </zippy> <button (click)="zippy.toggle()">toggle</button>
  • 30. AngularJS 2.0 <div> <input type="text" [value]="newTodoTitle"> <button (click)="addTodo()">+</buton> <tab-container> <tab-pane title="Good kids"> <div [ng-repeat|todo]="todosOf('good')"> <input type="checkbox" [checked]="todo.done"> {{todo.title}} <button (click)="deleteTodo(todo)"> X </button> </div> </tab-pane> ...
  • 31. Property binding <div [property-name]="expression"> <div [ng-repeat|person]="people"> <span [text]="person.name"></span> </div>
  • 32. AngularJS 2.0 <div> <input type="text" [value]="newTodoTitle"> <button (click)="addTodo()">+</buton> <tab-container> <tab-pane title="Good kids"> <div [ng-repeat|todo]="todosOf('good')"> <input type="checkbox" [checked]="todo.done"> {{todo.title}} <button (click)="deleteTodo(todo)"> X </button> </div> </tab-pane> ...
  • 33. AngularJS 2.0 <div> <input type="text" [value]="newTodoTitle"> <button (click)="addTodo()">+</buton> <tab-container> <tab-pane title="Good kids"> <div [ng-repeat|todo]="todosOf('good')"> <input type="checkbox" [checked]="todo.done"> {{todo.title}} <button (click)="deleteTodo(todo)"> X </button> </div> </tab-pane> ...
  • 34. Databinding Databinding to Element`s properties not to Element`s attributes <elm attr=”...”> elm.property=...
  • 37. Components = Building block (LEGO)
  • 39. Directive Definition Object ("DDO") myModule.directive('directiveName', function factory(injectables) { return { priority: 0, template: '<div></div>', // or // function(tElement, tAttrs) { ... }, // or // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... }, transclude: false, restrict: 'A', templateNamespace: 'html', scope: false, controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... }, controllerAs: 'stringAlias', require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '? optionalDirectiveName', '?^optionalParent'], compile: function compile(tElement, tAttrs, transclude) { return { pre: function preLink(scope, iElement, iAttrs, controller) { ... }, post: function postLink(scope, iElement, iAttrs, controller) { ... } } // or // return function postLink( ... ) { ... }
  • 40. Component = Directive … 그 지저분한 Directive 만 가지고 만들라고?
  • 43. SantaTodoApp component @ComponentDirective class SantaTodoApp { constructor() { this.newTodoTitle = ''; } addTodo: function() { ... } removeTodo: function(todo) { ... } todosOf: function(filter) { ... } }
  • 44. SantaTodoApp component @ComponentDirective({ ... }) class SantaTodoApp { ... } @TemplateDirective({ ... }) class NgRepeat { ... } @DecoratorDirective({ ... }) class NgClass { ... }
  • 45. SantaTodoApp component @ComponentDirective class SantaTodoApp { constructor() { this.newTodoTitle = ''; } addTodo: function() { ... } removeTodo: function(todo) { ... } todosOf: function(filter) { ... } }
  • 46. 어? $scope 은 어딨지?
  • 48. Component is the execution context for the template 컴포넌트의 모든 속성과 메소 드는 템플릿에서 사용할 수 있 다.
  • 50. Defining services class TodoStore { constructor(win:Window) { this.win = win; } add(todo) { // access this.win.localStorage ... } remove(todo) { ... } todosOf(filter) { ... } }
  • 52. Using services import {TodoStore} from './store'; @ComponentDirective({ directives: [TabContainer, TabPane, NgRepeat] }) class SantaTodoApp { constructor(store:TodoStore) { ... } ... }
  • 53. Directives and DI <tab-container> <tab-pane title="Tobias"> New Macbook Pro Tesla Model X ... </tab-pane> <tab-pane title="Good kids"> ... </tab-pane> <tab-pane title="Bad kids"> ... </tab-pane> </tab-container>
  • 54. Directives and DI class TabPane { constructor( tabContainer:TabContainer, element:HTMLElement ) { ... } ... } class TabContainer { constructor(tabs:Query<TabPane>) { ... } ... }
  • 55. 요약 사망 : Controller, $scope, DDO, Module, jqLite 출생 : AtScript, Web Component 지원, more? 다이어트를 했다?
  • 56. Angular 2.0 Source https://github.com/angular/angular
  • 57. reference Angular 2.0 Core by Igor Minar & Tobias Bosch at ng-europe 2014(Youtube) Miško Hevery - Keynote on AtScript at ng-europe 2014 (Youtube) Angular v2 Template Syntax Summary (Google Doc) Databinding with Web Components (Google Doc)