NG Interview Set I - Pipes Questions Flashcards

NG Interview Set I - Pipes Questions

1
Q

What is a pure pipe?

A
  • A pipe that is only executed when Angular detects a pure change to the input value (e.g. new primitive object or new object reference)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an impure pipe?

A
  • A pipe that is executed during every component change detection cycle (i.e., often – every keystroke, mouse move)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an async pipe?

A
  • An impure pipe that accepts a promise or observable as input and eventually returns emitted values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What kind of data can be used with async pipe?

A
  • Stateful, asynchronous
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What types of pipes are supported in Angular 2?

A
  • Pure and impure pipes (async pipes are a kind of impure pipe)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly