Skip to content

Commit 30d462d

Browse files
committed
Update README.md
1 parent 42aeaae commit 30d462d

1 file changed

Lines changed: 36 additions & 43 deletions

File tree

README.md

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<br/>
2222

23-
### Projects
23+
## Projects
2424

2525
|Sl.No| Project Name | Technologies Used |Live Demo |
2626
|-----|-------------------------------------------|---------------------------------------------- |-------------|
@@ -30,7 +30,7 @@
3030

3131
<br/>
3232

33-
### [Angular Basics](#-1-angular-basics)
33+
## [Angular Basics](#-1-angular-basics)
3434

3535
|Sl.No| Questions |
3636
|-----|----------------------------------------------------------|
@@ -60,7 +60,7 @@
6060
| 24. |[What is difference between Angular Modules and JavaScript Modules?](#q-what-is-difference-between-angular-modules-and-javascript-modules)|
6161
| 25. |[How would you make use of ngOnInit()?](#q-how-would-you-make-use-of-ngoninit)|
6262

63-
### [Configuration and Tools](#-2-configuration-and-tools)
63+
## [Configuration and Tools](#-2-configuration-and-tools)
6464

6565
|Sl.No| Questions |
6666
|-----|----------------------------------------------|
@@ -93,8 +93,7 @@
9393
| 52. |[What is a good use case for ngrx/entity?](#q-what-is-a-good-use-case-for-ngrx-entity)|
9494
| 53. |[What tools would you use to find a performance issue in your code?](#q-what-tools-would-you-use-to-find-a-performance-issue-in-your-code)|
9595

96-
97-
### Architecture
96+
## Architecture
9897

9998
|Sl.No| Questions |
10099
|-----|----------------------------------------------------------------------------------------------------------|
@@ -126,8 +125,7 @@
126125
| 79. |[Can I use AOT compilation with Ivy?](#q-can-i-use-aot-compilation-with-ivy)|
127126
| 80. |[What is the difference between exports and declarations in NgModule?](#q-what-is-the-difference-between-exports-and-declarations-in-ngmode)|
128127

129-
130-
### Component Interaction
128+
## Component Interaction
131129

132130
|Sl.No| Questions |
133131
|-----|--------------------------------------------------------------------|
@@ -162,7 +160,7 @@
162160
| 109. |[Which components will be notified when an event is emitted?](#q-which-components-will-be-notified-when-an-event-is-emitted)|
163161
| 110. |[What is the difference between Stateless and Stateful Component?](#q-what-is-the-difference-between-stateless-and-stateful-component)|
164162

165-
### Angular Forms
163+
## Angular Forms
166164

167165
|Sl.No| Questions |
168166
|-----|---------------------------------------------------------------------------------|
@@ -176,8 +174,7 @@
176174
| 118. |[What is the difference between dirty, touched, and pristine on a form element?](#q-what-is-the-difference-between-dirty-touched-and-pristine-on-a-form-element)|
177175
| 119. |[What is async validation and how is it done?](#q-what-is-async-validation-and-how-is-it-done)|
178176

179-
180-
### Pipes
177+
## Pipes
181178

182179
|Sl.No| Questions |
183180
|-----|------------------------------------|
@@ -190,8 +187,7 @@
190187
| 126. |[How does async pipe prevents memory leaks?](#q-how-does-async-pipe-prevents-memory-leaks)|
191188
| 127. |[What happens if you subscribe to a data source multiple times with async pipe?](#q-what-happens-if-you-subscribe-to-a-data-source-multiple-times-with-async-pipe)|
192189

193-
194-
### RxJS
190+
## RxJS
195191

196192
|Sl.No| Questions |
197193
|-----|--------------------------------|
@@ -224,9 +220,8 @@
224220
| 154. |[How would you implement a brush behavior using rxjs?](#q-how-would-you-implement-a-brush-behavior-using-rxjs)|
225221
| 155. |[How would you implement a color picker with rxjs?](#q-how-would-you-implement-a-color-picker-with-rxjs)|
226222
| 156. |[If you need to respond to two different Observable/Subject with one callback function, how would you do it?(ex: if you need to change the url through route parameters and with prev/next buttons).](#q-if-you-need-to-respond-to-two-different-observable-subject-with-one-callback-function-how-would-you-do-it-ex-if-you-need-to-change-the-url-through-route-parameters-and-with-prev-next-buttons)|
227-
228223

229-
### Routing
224+
## Routing
230225

231226
|Sl.No| Questions |
232227
|-----|----------------------------------------------------------------|
@@ -251,8 +246,7 @@
251246
| 175. |[Why do we need route guards?](#q-why-do-we-need-route-guards)|
252247
| 176. |[How to use authguard in angular 7?](#q-how-to-use-authguard-in-angular-7)|
253248

254-
255-
### Services & DI
249+
## Services & DI
256250

257251
|Sl.No| Questions |
258252
|-----|------------------------------------------------------------------------|
@@ -275,8 +269,7 @@
275269
| 193. |[What is static injector error in angular?](#q-what-is-static-injector-error-in-angular)|
276270
| 194. |[How to create logger service in angular?](#q-how-to-create-logger-service-in-angular)|
277271

278-
279-
### Angular Template
272+
## Angular Template
280273

281274
|Sl.No| Questions |
282275
|-----|----------------------------------------------------------------------------------|
@@ -296,8 +289,7 @@
296289
| 208. |[what is the difference between ng-content, ng-container and ng- template?](#q-what-is-the-difference-between-ng-content-ng-container-and-ng-template)|
297290
| 209. |[When you create a data-binding in Angular, are you working with attributes or properties? What is the difference anyway?](#q-when-you-create-a-data-binding-in-angular-are-you-working-with-attributes-or-properties-what-is-the-difference-anyway)|
298291

299-
300-
### Angular Animations
292+
## Angular Animations
301293

302294
|Sl.No| Quesions |
303295
|-----|----------------------------------------------------|
@@ -315,8 +307,7 @@
315307
| 221. |[How would you select all the child components elements?](#q-how-would-you-select-all-the-child-components-elements)|
316308
| 222. |[How would you select a css class in any ancestor of the component host element, all the way up to the document root?](#q-how-would-you-select-a-css-class-in-any-ancestor-of-the-component-host-element-all-the-way-up-to-the-document-root)|
317309

318-
319-
### Performance
310+
## Performance
320311

321312
|Sl.No| Questions |
322313
|-----|--------------------------------------------------|
@@ -332,8 +323,7 @@
332323
| 232. |[How would you use cached data?](#q-how-would-you-use-cached-data)|
333324
| 233. |[What are some ways you may improve your website scrolling performance?](#q-what-are-some-ways-you-may-improve-your-website-s-scrolling-performance)|
334325

335-
336-
### Miscellaneous
326+
## Miscellaneous
337327

338328
|Sl.No| Questions |
339329
|-----|--------------------------------------|
@@ -355,6 +345,8 @@
355345

356346
## # 1. ANGULAR BASICS
357347

348+
<br/>
349+
358350
## Q. What are the frequently used command in angular?
359351

360352
|Commands |Description |
@@ -387,22 +379,24 @@
387379

388380
Angular has 2 types of build dev build or prod build
389381

390-
**JIT**
382+
**1. JIT:**
383+
391384
Just-in-Time (JIT) is a type of compilation that compiles app in the browser at runtime. JIT compilation is the default when you run the ng build (build only) or ng serve (build and serve locally) CLI commands. i.e, the below commands used for JIT compilation,
392385

393-
```javascript
386+
```js
394387
ng build
395388
ng serve
396389
```
397-
**AOT**
390+
391+
**2. AOT:**
398392
Ahead-of-Time (AOT) is a type of compilation that compiles app at build time. For AOT compilation, include the `--aot` option with the ng build or ng serve command as below,
399393

400-
```javascript
394+
```js
401395
ng build --aot
402396
ng serve --aot
403397
```
404398

405-
```
399+
```js
406400
ng build or ng build --dev - this is for development build
407401
ng build --prod - this is for production build
408402
```
@@ -414,7 +408,6 @@ ng build --prod - this is for production build
414408
|Dev build is not tree shaked |Production build is tree shaked |
415409
|No AOT compilation |AOT compilation takes place |
416410

417-
418411
* **minification** - process of removing excess whitespace, comments and optinal tokens like curly braces and semi colons
419412
* **uglification** - process of transforming code to use short variable and function names
420413
* **tree shaking** - is the process of removing any code that we are not actually using in our application from the final bundle
@@ -449,7 +442,7 @@ You can control your app compilation in two ways
449442

450443
## Q. How to optimize loading large data in angular?
451444

452-
**Load Time Performance**
445+
**Load Time Performance:**
453446

454447
1. **AOT**: The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code. Compiling your application during the build process provides a faster rendering in the browser.
455448
2. **Tree-shaking**: This is the process of removing unused code resulting in smaller build size. In **angular-cli**, Tree-Shaking is enabled by default.
@@ -789,7 +782,7 @@ subject.next("d"); // Subscription got d
789782

790783
Subject does not return the current value on Subscription. It triggers only on `.next(value)` call and return/output the value
791784

792-
```javascript
785+
```js
793786
var subject = new Rx.Subject();
794787

795788
subject.next(1); //Subjects will not output this value
@@ -818,7 +811,7 @@ observerB: 3
818811

819812
A BehaviorSubject holds one value. When it is subscribed it emits the value immediately. A Subject does not hold a value. BehaviourSubject will return the initial value or the current value on Subscription.
820813

821-
```javascript
814+
```js
822815
var subject = new Rx.BehaviorSubject(0); // 0 is the initial value
823816

824817
subject.subscribe({
@@ -2152,7 +2145,7 @@ interface Observer<T> {
21522145
}
21532146
```
21542147
A handler that implements the Observer interface for receiving observable notifications will be passed as a parameter for observable as below,
2155-
```javascript
2148+
```js
21562149
myObservable.subscribe(myObserver);
21572150
```
21582151
*Note: If you do not supply a handler for a notification type, the observer ignores notifications of that type.*
@@ -2966,7 +2959,7 @@ The commonly-needed services, pipes, and directives provided by `@angular/common
29662959
## Q. What is codelyzer?
29672960
29682961
Codelyzer provides set of tslint rules for static code analysis of Angular TypeScript projects. ou can run the static code analyzer over web apps, NativeScript, Ionic etc. Angular CLI has support for this and it can be use as below,
2969-
```javascript
2962+
```js
29702963
ng new codelyzer
29712964
ng lint
29722965
```
@@ -3099,7 +3092,7 @@ export class App {
30993092
31003093
Angular Ivy is a new rendering engine for Angular. You can choose to opt in a preview version of Ivy from Angular version 8.
31013094
1. You can enable ivy in a new project by using the --enable-ivy flag with the ng new command
3102-
```javascript
3095+
```js
31033096
ng new ivy-demo-app --enable-ivy
31043097
```
31053098
2. You can add it to an existing project by adding `enableIvy` option in the `angularCompilerOptions` in your project `tsconfig.app.json`.
@@ -3163,7 +3156,7 @@ The Angular Language Service is a way to get completions, errors, hints, and nav
31633156
## Q. How do you install angular language service in the project?
31643157
31653158
You can install Angular Language Service in your project with the following npm command
3166-
```javascript
3159+
```js
31673160
npm install --save-dev @angular/language-service
31683161
```
31693162
After that add the following to the "compilerOptions" section of your project tsconfig.json
@@ -3216,7 +3209,7 @@ The Angular CLI command `ng run` is used to invoke a builder with a specific tar
32163209
32173210
An App shell is a way to render a portion of your application via a route at build time. This is useful to first paint of your application that appears quickly because the browser can render static HTML and CSS without the need to initialize JavaScript. You can achieve this using Angular CLI which generates an app shell for running server-side of your app.
32183211
3219-
```javascript
3212+
```js
32203213
ng generate appShell [options] (or)
32213214
ng g appShell [options]
32223215
```
@@ -3332,11 +3325,11 @@ Below are the list of key advantages of Bazel tool,
33323325
The `@angular/bazel` package provides a builder that allows Angular CLI to use Bazel as the build tool.
33333326
33343327
**1. Use in an existing applciation:** Add `@angular/bazel` using CLI
3335-
```javascript
3328+
```js
33363329
ng add @angular/bazel
33373330
```
33383331
**2. Use in a new application:** Install the package and create the application with collection option
3339-
```javascript
3332+
```js
33403333
npm install -g @angular/bazel
33413334
ng new --collection=@angular/bazel
33423335
```
@@ -3360,10 +3353,10 @@ bazel run [target]: Compile the program represented by target and then run it.
33603353
<b><a href="#">↥ back to top</a></b>
33613354
</div>
33623355
3363-
<br/>
3364-
33653356
## # 2. CONFIGURATION AND TOOLS
33663357
3358+
<br/>
3359+
33673360
## Q. What is angular CLI?
33683361
33693362
Angular CLI(**Command Line Interface**) is a command line interface to scaffold and build angular apps using nodejs style (commonJs) modules.
@@ -5828,7 +5821,7 @@ export default {
58285821
```
58295822
58305823
**package.json**
5831-
```javascript
5824+
```js
58325825
{
58335826
"name": "babel-webpack",
58345827
"version": "1.0.0",

0 commit comments

Comments
 (0)