Week 8 - Angular Flashcards

1
Q

What is Angular?

A

Angular is a Typescript based, open-source, front-end web app framework

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Are AngularJS and Angular the same?

A

No. Angular is a complete rewrite of AngularJS.

AngularJS is based on Javascript, while Angular utilized Typescript which transcribes into Javascript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What 3 technologies would you include in your environment to create an Angular app?

A
  • node.js - a JS runtime built on Chrome’s V8 JS engine
  • Node Package Manager (npm) - default package manager for node.js
  • Angular CLI - command line interface used to structure and build Angular apps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Angular CLI?

A

a command line interface used to structure and build Angular apps using node.js style modules. It also handles many common tasks for you, such as generating directives, services, and components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What CLI command would you use tocreate an Angular project using the Angular CLI?

A

ng new (project name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the folder structure of an Angular app created by the Angular CLI?

A

o E2E – The end to end test folder mainly used for integration testing
o Node modules- where Node Package manager packages are installed
o SRC- contains all of the files for the actual Angular project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where is the app folder located?

A

within the project’s src folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What file does the app folder contain if the project is created by the Angular CLI? (4)

A
  1. app.module.ts – contains the references to different libraries used within the project
  2. app.component.css - contains the CSS structure for the component
  3. app.component.html – contains the html template for the component
  4. app.component.ts – contains the class for the component. Holds the logic to manage the functionality of the component
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a decorator?

A
  • a special kind of declaration that can be attached to a class declaratio, method, accessor, property, or parameter.
  • functions that are called at declaration
  • look a lot like annotations and are used to mold metadata in Angular
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a module?

A
  • in JS and TS (typescript), modules refer to small units of independent reusable code. when you use the keyword export on a class, it becomes a module for another file to import later.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is @ngModule?

A
  • a decorator used to create a module.

- it configures the injector and the compiler, and helps organize related things together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some attributes inside the @ngModule? (4)

A
  1. declarations - stores the references for components
  2. imports - stores the references to store modules
  3. providers - stores the references to the services created
  4. bootstrap - has the references to the default component created; the bootstrapped component is created and inserted in the browser DOM
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is bootstrapping?

A

the first piece of code that is loaded; in the case of Angular, we have to tell it which component is the starting point for our app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a component?

A
  • the fundamental building blocks of our app

- Angular documentation - a component controls a patch of the screen real estate that we could call a view, and declares

How well did you know this?
1
Not at all
2
3
4
5
Perfectly