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 2a31901

Browse files
Fixed typos
1 parent 8d057a5 commit 2a31901

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

‎README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A: A variable (defined using a #) in a component template, which can be referenc
2222

2323
**What are the possible ways to bind component properties to an associated template?**
2424

25-
A: interpolation binding, one way binding, two way binding.
25+
A: Interpolation binding, one way binding, two way binding.
2626

2727
## Component/Directive Questions
2828

@@ -63,43 +63,43 @@ A: By specifying the moduleId to be module.id in the Component decorator. (Note:
6363

6464
**What is the purpose of NgModule?**
6565

66-
A: to give Angular information on a particular module’s contents, through decorator properties like: declarations, imports, exports, providers, etc.
66+
A: It's to give Angular information on a particular module’s contents, through decorator properties like: declarations, imports, exports, providers, etc.
6767

6868
**How do you decide to create a new NgModule?**
6969

7070
A: Typically for a nontrivial feature in an application, that will involve a collection of related components and services.
7171

7272
**What are the attributes that you can define in an NgModule annotation?**
7373

74-
A: declarations, imports, exports, providers, bootstrap
74+
A: Declarations, imports, exports, providers, bootstrap
7575

7676
**What is the difference between a module's forRoot() and forChild() methods and why do you need it?**
7777

7878
A: forRoot and forChild are conventional names for methods that deliver different import values to root and feature modules.
7979

8080
**What would you have in a shared module?**
8181

82-
A: common components, directives, and pipes used in other modules in your application.
82+
A: Common components, directives, and pipes used in other modules in your application.
8383

8484
**What would you not put shared module?**
8585

86-
A: services that should not have multiple instances created for the application.
86+
A: Services that should not have multiple instances created for the application.
8787

8888
**What module would you put a singleton service whose instance will be shared throughout the application (e.g. ExceptionService andLoggerService)?**
8989

9090
A: Root Module
9191

9292
**What is the purpose of exports in an NgModule?**
9393

94-
A: provide components, directives, pipes to other modules for their usage.
94+
A: Provide components, directives, pipes to other modules for their usage.
9595

9696
**Why is it (potentially) bad if SharedModule provides a service to a lazy loaded module?**
9797

9898
A: You will have two instances of the service in your application, which is often not what you want.
9999

100100
**Can we import a module twice?**
101101

102-
A: yes, and the latest import will be what is used.
102+
A: Yes, and the latest import will be what is used.
103103

104104
**Can you re-export classes and modules?**
105105

@@ -146,15 +146,15 @@ A: Called once, after the first ngOnChanges.
146146

147147
**How would you make use of onNgInit()?**
148148

149-
PA: fetch initial component data (e.g. from server).
149+
PA: Fetch initial component data (e.g. from server).
150150

151151
**What would you consider a thing you should be careful doing on onNgInit()?**
152152

153153
A: You cannot expect the component's children's data-bound properties to have been checked at this point.
154154

155155
**What is the difference between onNgInit() and constructor() of a component?**
156156

157-
A: a directive’s data-bound input properties are not set until after construction, so that’s one difference.
157+
A: A directive’s data-bound input properties are not set until after construction, so that’s one difference.
158158

159159
## Pipes Questions:
160160

@@ -168,11 +168,11 @@ A: A pipe that is executed during every component change detection cycle (i.e.,
168168

169169
**What is an async pipe?**
170170

171-
A: an impure pipe that accepts a promise or observable as input and eventually returns emitted values.
171+
A: An impure pipe that accepts a promise or observable as input and eventually returns emitted values.
172172

173173
**What kind of data can be used with async pipe?**
174174

175-
A: stateful, asynchronous
175+
A: Stateful, asynchronous
176176

177177
**What types of pipes are supported in Angular 2?**
178178

@@ -186,7 +186,7 @@ A: forRoot is a convention for configuring app-wide Router service with routes,
186186

187187
**How does loadChildren property work?**
188188

189-
A: the Router calls it to dynamically load lazy loaded modules for particular routes.
189+
A: The Router calls it to dynamically load lazy loaded modules for particular routes.
190190

191191
**When does a lazy loaded module get loaded?**
192192

@@ -213,25 +213,25 @@ A: Using the `:host` pseudo-class selector in your component's styles.
213213

214214
**How do you reference the host of a component?**
215215

216-
A: let DI inject an ElementRef into the constructor of your component.
216+
A: Let DI inject an ElementRef into the constructor of your component.
217217

218218
**What pseudo-class selector targets styles in the element that hosts the component?**
219219

220220
A: The :host pseudo class selector.
221221

222222
**How would you select all the child components' elements?**
223223

224-
A: with the @ViewChildren decorator, like for example:
224+
A: With the @ViewChildren decorator, like for example:
225225

226226
`@ViewChildren(ChildDirective) viewChildren: QueryList<ChildDirective>;`
227227

228228
**How would you select a css class in any ancestor of the component host element, all the way up to the document root?**
229229

230-
A: using the :host-context() pseudo-class selector.
230+
A: Using the :host-context() pseudo-class selector.
231231

232232
**What selector force a style down through the child component tree into all the child component views?**
233233

234-
A: use the /deep/ selector along with :host pseudo-class selector.
234+
A: Use the /deep/ selector along with :host pseudo-class selector.
235235

236236
**What does :host-context() pseudo-class selector target?**
237237

@@ -269,22 +269,22 @@ A: pass in Validator objects along with the FormControl objects...
269269

270270
**What's the difference between dirty, touched, and pristine on a form element?**
271271

272-
A: dirty means it contains user data, touched means the user has at least done something with a particular control (perhaps just literally ‘touched’ it by giving it focus?), and pristine means the control has not been touched at all by the user.
272+
A: Dirty means it contains user data, touched means the user has at least done something with a particular control (perhaps just literally ‘touched’ it by giving it focus?), and pristine means the control has not been touched at all by the user.
273273

274274
**How can you access validation errors in the template to display error messages?**
275275

276-
PA: use formErrors
276+
PA: Use formErrors
277277

278278
**What is async validation and how is it done?**
279279

280-
A: verifying some field using some asynchronous call (perhaps a server call)... return a `Promise<ValidationResult>` from your validator. When creating a FormControl object, you can pass an asynchronous validator into the constructor (e.g. `new FormControl(‘value’, syncValidator, asyncValidator)`).
280+
A: Verifying some field using some asynchronous call (perhaps a server call)... return a `Promise<ValidationResult>` from your validator. When creating a FormControl object, you can pass an asynchronous validator into the constructor (e.g. `new FormControl(‘value’, syncValidator, asyncValidator)`).
281281

282282

283283
## Architecture Questions:
284284

285285
**What is a good use case for ngrx/store?**
286286

287-
A: complex application state management requirements, involving asynchronous requests to update state...
287+
A: Complex application state management requirements, involving asynchronous requests to update state.
288288

289289
**What would be a good use case for having your own routing module?**
290290

0 commit comments

Comments
(0)

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