Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular2 toolbox
Search
GDG Cherkasy
May 29, 2017
Programming
0
60
Angular2 toolbox
Vlad Bolibruk, JS developer, DevOps at Master of Code
GDG Cherkasy
May 29, 2017
Tweet
Share
More Decks by GDG Cherkasy
See All by GDG Cherkasy
Трансформація від розробника до ліда: байки та поради.
gdgcherkasy
0
140
Емоції: усвідомлення, прийняття, комунікація
gdgcherkasy
0
120
Kibana Plugin Development - Vlad Bolibruk
gdgcherkasy
0
81
“Why JS is way to go for backend”
gdgcherkasy
0
79
CoreData, custom merge policy
gdgcherkasy
2
1.6k
macOS_for_iOS_devs2.pdf
gdgcherkasy
0
77
MQTT.pdf
gdgcherkasy
1
42
Инструменты Lean Product Management как точки пересечения проектов с "реальностью": хватит клонировать плохие решения!
gdgcherkasy
1
81
Насколько силен Иммунитет вашей организации?
gdgcherkasy
1
110
Other Decks in Programming
See All in Programming
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
3
900
Windows on Ryzen and I
seosoft
0
320
安いハードウェアでVulkan
fadis
0
520
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
150
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
580
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
400
AI活用のコスパを最大化する方法
ochtum
0
220
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
0
270
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
220
AHC061解説
shun_pi
0
400
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
220
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
The Limits of Empathy - UXLibs8
cassininazir
1
260
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Faster Mobile Websites
deanohume
310
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
78
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
43k
Ruling the World: When Life Gets Gamed
codingconduct
0
180
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Transcript
Angular2 toolbox by Vlad Bolibruk Master of Code Global
Angular and Plugins Steps to install module: 1.npm install packet_name
--save or 1.npm install packet_name_without_angular_support --save 2.npm install @types/packet_name_without_angular_support --save
Old steps to deploy Angular2 1.npm install (optional). 2.npm build_prestage
| npm build_stage. 3.”git add files” && git commit -m “commit message” && git push. 4.on “server git pull && service nginx restart”.
New way to deploy: 1.”git add files” && git commit
-m “commit message” && git push 2.Go to jenkins site. 3.Choose deploy project. 4.Click deploy, view Hipchat.
1.Git push 2. a.Web hook to jenkins. b.Jenkins pulls repo.
c.Build. 3. a.Docker Build. b.Docker push to docker hub. 4. a.Run Ansible Playbook. 5. a.Docker pull. b.reload of container change.
None
Steps on Jenkins . ~/.profile yarn install npm run build_prestage
docker build -f Dockerfile --tag="registryUrl/imagname" . docker push registryUrl/imagname ansible-playbook recipe.yml -i inverntory.ini --tags=prestage
Action Cable import { Ng2Cable, Broadcaster } from ‘ng2-cable/js/index’; constructor
(private _ng2Cable: Ng2Cable, _broadcaster: Broadcaster) {} subscribeToCable (length) { this._ng2Cable.subscribe(`${apiUrl}cable?room=${length}`, ‘NotificationsChannel’) this._broadcaster.on<string>(‘NotificationsChannel’).subscribe( data => { } ) }
Event emitter
Code implements Service public PushedProfile = new EventEmitter<any>(); pushProfileData(value){ this.PushedProfile.emit(value);
} Component that produces changes notifyProfileChange() { this._userService.pushProfileData('profileChange'); }
Component that listens to changes getNotifyProfileChange() { this._userService.PushedProfile.takeUntil(this.ngUnsubscribe ).subscribe( data
=> {this.getUserDetails(); }, error => { this.errorMessage = <any>error; } ); }
Observable subscriptions handling, first step: private sub: Subscription; this.sub =
this.service.method().subscribe( data => { }, error => this.errorMessage = <any>error ); ngOnDestroy() { this.sub.unsubscribe(); }
Observable subscriptions handling, second step: private sub: Subscription = null;
ngOnDestroy() { if( this.sub != null){ this.sub.unsubscribe() } }
Observable subscriptions handling, third step: import 'rxjs/add/operator/takeUntil'; import { Subject
} from 'rxjs/Subject'; private ngUnsubscribe: Subject<void> = new Subject<void>(); this.service.getData().takeUntil(this.ngUnsubscribe).subscribe( data => this.object = data, error => this.errorMessage = <any>error ); ngOnDestroy() { this.ngUnsubscribe.next(); this.ngUnsubscribe.complete(); }
Use Only Pipe if you need filter same data Never
Use !!! <div>{{ filterData(slot.start) }}</div> filterData (start) { return timezone.tz(data, args).format(‘h:mm A’) } Valid Use <div>{{ slot.start | formatSlotTime: clinic:tomezone }}</div> @Pipe({ name: ‘formatSlotTime’ }) transform(val: any, args: any, filter: string) { return timezone.tz(data, args).format(‘h:mm A’); }
None