Angular 2 Flashcards

1
Q

4 key building blocks of angular 2 apps

A

Components
Directives
Routers
Services

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

Component

A
  • Encapsulates the template, data, and behavior of a view (view component)
  • Every app will have AT LEAST root component
  • Are reusable
  • Typescript/JavaScript class
  • Do not need to reference the DOM
  • Is bound to element
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Service

A
  • Provide specific functionality not directly related to views
  • Injected into components as dependencies
  • Any logic not related to ‘view’
  • Any non UI logic
  • ex. talking to backend APIs
  • Data access, logging, business logic, configuration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Router

A
  • Only responsible for navigation
  • Defines navigation paths
  • Maps URL-like paths to views instead of pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Directive

A
  • To modify DOM elements and/or extend their behavior

- keywords added to DOM elements

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

ng new

A
  • Creates workspace and initial application
  • CLI installs necessary npm packages
  • creates skeleton
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Angular?

A

A platform and framework for building single-page client applications using HTMl and TypeScript

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

NgModules

A
  • a class @NgModule
  • takes a metadata object that describes how to compile a component’s template and how to create an injector at runtime
  • Help organize related things together
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Views

A
  • Sets of screen elements that Angular can choose amongh and modify according to program login and data
  • arranged hierarchically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

decorators

A
  • Used by module, component and service classes
  • functions that modify JavaScript classes
  • Angular defines some that attach specific kinds of metadata to classes (tells system what those classes mean and how they should work)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

AppModule (root module)

A
  • Present in every Angular app

- provides bootstrap mechanism

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

workspace

A
  • contains the files for one or more projects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

project

A
  • set of files that comprise as standalone application or shareable library
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

attribute directive

A

changes the appearance of behavior of a DOM element

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

ng generate directive DIRECTIVE_NAME

A

instantiates the directive to your src/app

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

ng serve

A

starts server, runs app

17
Q

pipe operator |

A

transform strings, currency amounts, dates, and other data for display
simple functions you can use in template expressions to accept an input value and return a transformed value

18
Q

[(ngModel)]

A

two-way binding

19
Q

dependency

A

services or objects that a class needs to perform its function

20
Q

provider

A

something that can create or deliver a service

21
Q

provider

A

something that can create or deliver a service