|
2 | 2 |
|
3 | 3 | This is a collection of Angular 2 interview questions I've found online, along with (hopefully) correct answers for most of them. Feel free to contribute / send corrections.
|
4 | 4 |
|
5 | | -Note: PA == Possible Answer (one of many valid ones), A == Answer. |
| 5 | +Note: "PA" === Possible Answer (one of many valid ones), and "A" === Answer. |
6 | 6 |
|
7 | 7 | ## Animations Questions
|
8 | 8 |
|
@@ -36,23 +36,23 @@ A: A component is a directive with a template (representing a view).
|
36 | 36 |
|
37 | 37 | **What are different kinds of directives supported in Angular 2?**
|
38 | 38 |
|
39 | | -A: Structural, directive, component, and attribute directives. |
| 39 | +A: Structural, component, and attribute directives. |
40 | 40 |
|
41 | 41 | **How do components communicate with each other?**
|
42 | 42 |
|
43 | | -A: Various ways - for example: Input/Output properties, services, ViewChild/ViewContent... |
| 43 | +A: Various ways - for example: Input/Output properties, services, ViewChild/ViewContent. |
44 | 44 |
|
45 | 45 | **How do you create two way data binding in Angular 2.0?**
|
46 | 46 |
|
47 | | -Answer: By using the two-way binding syntax [()] along with ngModel... |
| 47 | +A: By using the two-way binding syntax [()] along with ngModel... |
48 | 48 |
|
49 | 49 | **How would you create a component to display error messages throughout your application?**
|
50 | 50 |
|
51 | 51 | A: Implement your own ErrorHandler and configure it in the list of providers for the modules you want it used in.
|
52 | 52 |
|
53 | 53 | **How would you support logging in your Angular app?**
|
54 | 54 |
|
55 | | -PA: Set up angular2-logger, which is a package inspired by log4j. |
| 55 | +PA: One way would be to up angular2-logger, which is a package inspired by log4j. |
56 | 56 |
|
57 | 57 | **How do you resolve a template URL relative to a Component class?**
|
58 | 58 |
|
|
0 commit comments