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
58
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
120
Емоції: усвідомлення, прийняття, комунікація
gdgcherkasy
0
96
Kibana Plugin Development - Vlad Bolibruk
gdgcherkasy
0
76
“Why JS is way to go for backend”
gdgcherkasy
0
77
CoreData, custom merge policy
gdgcherkasy
2
1.6k
macOS_for_iOS_devs2.pdf
gdgcherkasy
0
71
MQTT.pdf
gdgcherkasy
1
36
Инструменты Lean Product Management как точки пересечения проектов с "реальностью": хватит клонировать плохие решения!
gdgcherkasy
1
77
Насколько силен Иммунитет вашей организации?
gdgcherkasy
1
100
Other Decks in Programming
See All in Programming
『リコリス・リコイル』に学ぶ!! 〜キャリア戦略における計画的偶発性理論と変わる勇気の重要性〜
wanko_it
1
540
LLMは麻雀を知らなすぎるから俺が教育してやる
po3rin
3
2.2k
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
280
Honoアップデート 2025年夏
yusukebe
1
750
新しいモバイルアプリ勉強会(仮)について
uetyo
1
260
TROCCO×dbtで実現する人にもAIにもやさしいデータ基盤
nealle
0
260
Bedrock AgentCore ObservabilityによるAIエージェントの運用
licux
9
700
ライブ配信サービスの インフラのジレンマ -マルチクラウドに至ったワケ-
mirrativ
1
240
Portapad紹介プレゼンテーション
gotoumakakeru
1
130
あのころの iPod を どうにか再生させたい
orumin
2
2.5k
What's new in Adaptive Android development
fornewid
0
140
一人でAIプロダクトを作るための工夫 〜技術選定・開発プロセス編〜 / I want AI to work harder
rkaga
12
2.7k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
How to train your dragon (web standard)
notwaldorf
96
6.2k
4 Signs Your Business is Dying
shpigford
184
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Designing Experiences People Love
moore
142
24k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Building Applications with DynamoDB
mza
96
6.6k
Why Our Code Smells
bkeepers
PRO
338
57k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Building Adaptive Systems
keathley
43
2.7k
Rails Girls Zürich Keynote
gr2m
95
14k
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