Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f7dd71f

Browse files
More questions
1 parent b832f65 commit f7dd71f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,46 @@ PA: Using the transition and animate function in an animations block like so: `a
1414
A: Using the asterisk - example: `transition('* => active'), animate('100ms ease-in'))`
1515

1616
## Template Syntax Questions
17+
1718
**What is a template reference variable, and how would you use it?**
19+
1820
A: A variable (defined using a #) in a component template, which can be referenced in other parts of the template. For example, a template variable for a form can then be referenced by other elements of the form.
1921

2022
**What are the possible ways to bind component properties to an associated template?**
23+
2124
A: interpolation binding, one way binding, two way binding.
2225

2326
## Component/Directive Questions
27+
2428
**What is the minimum definition of a component?**
29+
2530
A: A class with a Component decorator specifying a template.
2631

2732
**What is the difference between a component and a template?**
33+
2834
A: A component is a directive with a template (representing a view).
2935

3036
**What are different kinds of directives supported in Angular 2?**
37+
3138
A: Structural, directive, component, and attribute directives.
3239

40+
**How do components communicate with each other?**
41+
42+
A: Various ways - for example: Input/Output properties, services, ViewChild/ViewContent...
43+
44+
**How do you create two way data binding in Angular 2.0?**
45+
46+
Answer: By using the two-way binding syntax [()] along with ngModel...
47+
48+
**How would you create a component to display error messages throughout your application?**
49+
50+
A: Set up an ErrorHandler... TODO
51+
52+
**How would you support logging in your Angular app?**
53+
54+
PA: Set up angular2-logger, which is a package inspired by log4j.
55+
56+
**How do you resolve a template URL relative to a Component class?**
57+
58+
A: By specifying the moduleId to be module.id in the Component decorator. (Note: while this is still needed when using SystemJS, it is not necessary anymore when using Webpack module bundler for Angular 2 projects.)
59+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /