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
angular#3
Search
Danila Marchenkov
September 05, 2017
Education
49
0
Share
angular#3
Danila Marchenkov
September 05, 2017
More Decks by Danila Marchenkov
See All by Danila Marchenkov
Rxjs
sprit3dan
0
100
angular6
sprit3dan
0
77
angular5
sprit3dan
0
56
angular#4
sprit3dan
0
160
angular#2
sprit3dan
0
39
Angular#1
sprit3dan
0
56
HTML 5 Canvas
sprit3dan
0
47
Angular #6
sprit3dan
0
73
Angular #5
sprit3dan
0
120
Other Decks in Education
See All in Education
PE array testbench data order (config)
songchch
0
170
Gitの中身 / 03-a-git-internals
kaityo256
PRO
0
160
次期バージョン 14.5.1 Early Access Program が始まりました
harunakano
1
130
Tangible, Embedded and Embodied Interaction - Lecture 7 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.1k
Lenguajes de Programacion (Ingresantes UNI 2026)
robintux
0
150
P3NFEST 2026 Spring ハンズオン「ハッキング・ラブ!はじめてのハッキングをやってみよう」資料
nomizone
0
380
反応する前に「受容する」力を鍛える。 自分の安全地帯🌱 を育てよう / Cultivating and sharing ventral vagal safety.
spring_aki
0
110
渡辺研Slackの使い方 / Slack Local Rule
kaityo256
PRO
11
11k
GitHubによるWebアプリケーションのデプロイ / 07-github-deploy
kaityo256
PRO
1
210
Data Representation - Lecture 3 - Information Visualisation (4019538FNR)
signer
PRO
1
2.9k
Highest and Best Use: Development Considerations for Land Sites
rmccaic
0
170
アントレプレナーシップ教育機構 概要
sciencetokyo
PRO
0
600
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
The Language of Interfaces
destraynor
162
26k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
92
Code Review Best Practice
trishagee
74
20k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
How to Ace a Technical Interview
jacobian
281
24k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
470
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
140
Transcript
Angular Marchenkov Danila, Software Developer
angularJS filters Pipes
Pipes Built-in Custom
import { Component } from '@angular/core'; @Component({ selector: 'hero-birthday', template:
`<p>The hero's birthday is {{ birthday | date }}</p>` }) export class HeroBirthdayComponent { birthday = new Date(1988, 3, 15); // April 15, 1988 }
aPipe | bPipe | cPipe
best way to manipulate data to display
import { Pipe, PipeTransform } from '@angular/core'; /* * Raise
the value exponentially * Takes an exponent argument that defaults to 1. * Usage: * value | exponentialStrength:exponent * Example: * {{ 2 | exponentialStrength:10 }} * formats to: 1024 */ @Pipe({name: 'exponentialStrength'}) export class ExponentialStrengthPipe implements PipeTransform { transform(value: number, exponent: string): number { let exp = parseFloat(exponent); return Math.pow(value, isNaN(exp) ? 1 : exp); } }
Pure vs Inpure
Pure pipes Angular executes a pure pipe only when it
detects a pure change to the input value. A pure change is either a change to a primitive input value (String, Number, Boolean, Symbol) or a changed object reference (Date, Array, Function, Object).
Impure pipes Angular executes an impure pipe during every component
change detection cycle
import { Pipe, PipeTransform } from '@angular/core'; import { Http
} from '@angular/http'; @Pipe({ name: 'fetch', pure: false }) export class FetchJsonPipe implements PipeTransform { private cachedData: any = null; private cachedUrl = ''; constructor(private http: Http) { } transform(url: string): any { if (url !== this.cachedUrl) { this.cachedData = null; this.cachedUrl = url; this.http.get(url) .map( result => result.json() ) .subscribe( result => this.cachedData = result ); } return this.cachedData; } }