Introduction Flashcards

1
Q

What is Angular?

A

Angular is a TypeScript-based open-source web application framework developed by the Angular Team at Google

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

What is TypeScript?

A

It is an open-source programming language on top of JavaScript to support static typing and other functionalities.

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

What is JavaScript?

A

– High-level, multi-paradigm (OO, functional) programming language

– Alongside HTML and CSS, JavaScript is one of the core technologies of the Web

– Initially only implemented client-side in web browsers, but JavaScript is now available server-side, in mobile and desktop apps too

  • Dynamically and weakly typed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the main building blocks of an Angular application?

A

Modules, Components and Services

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

What are some of the technologies you might include in your environment to create an Angular application?

A

NodeJS
npm
Angular CLI

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

What is the Angular CLI?

A

It is a Command-line interface tool that you use to develop Angular applications

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

What is Node.js?

A
  • Node.js is an open-source JavaScript runtime environment that executes JavaScript code outside of a browser (It allows for servers to be written using JavaScript)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is npm?

A

– Node Package Manager – package (dependency) manager for Node.js packages

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

What is AJAX?

A
  • Asynchronous JavaScript and XML
  • Allows web pages to be updated asynchronously by exchanging data with a web server
  • Transports data in XML, plain text, or JSON format (JSON is the most widespread nowadays)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are directives in Angular?

A
  • Directives are basically function calls in the HTML template
  • There are three types: Component, Structural and Attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the use of @Input and @Output?

A
  • They are used for communication between Angular Components, which are in Parent-Child Relationship
  • Both of them are used in the Child Component
  • We use @Input when we are passing data from the parent to the child component and @Output when we emit an event from the Child that the parent can subscribe to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Dependency Injection in Angular?

A

When a component is dependent on another component the dependency is injected/provided during runtime by Angular’s built-in dependency injection system

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

In what ways can a component (.ts) and a template (.html) file communicate with each other?

A
  • interpolation: {{}}
  • property binding: []
  • event binding: ()
  • two-way binding: [()]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are observables?

A

An observable is a data source that publishes (emits) data changes.
Observers (consumers) subscribe to know whenever the data changes.

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

How do components exchange information if they are not in a parent/child relationship?

A

Through Services and Subjects (a special type of observable)

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

What do the built-in HttpClient’s requests return?

A
  • An observable that the components can subscribe to
  • The HTTP request is not sent until a component subscribes to the returned observable
17
Q

What different form-building approaches are there in Angular?

A
  • Template-driven approach - easier to use but not as configurable
  • Reactive approach - a bit more code but a lot more control over the developer
18
Q

What are lifecycle hooks in Angular?

A
  • Directive and component instances have a lifecycle as Angular creates, updates, and destroys them
  • Developers can interfere at key moments in that lifecycle by implementing one or more of the lifecycle hook interfaces
  • There are 8 lifecycle hooks:
    ngOnChanges()
    ngOnInit()
    ngDoCheck()
    ngAfterContentInit()
    ngAfterContentChecked()
    ngAfterViewInit()
    ngAfterViewChecked()
    ngonDestroy()
19
Q

What are the major features of Angular?

A

declarative templates, dependency injection, end-to-end tooling