Angular

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What are the purposes of classes and decorators?

Class: blueprint for creating objects Decorators: function that allows services, directive, or filters to be modified prior to its usage

Explain the various files and their purposes within an Angular application.

*Application Project Files: -app/ - contains the component files in which your application logic and data are defined -app/app.component.ts - defines the logic for the app's root component -app/app.component.html - defines the HTML template associated with the root AppComponent -app/app.component.css - defines the CSS stylesheet for the root component -app/app.component.spec.ts - defines a unit test for the root component -app/app.module.ts - defines the root module, AppModule, that tells Angular how to assemble the application -index.html - the main index page that is served when someone visits your site -main.ts - entry point of your application. compiles the application with the JIT compiler and bootstraps the applications's root module to run in the browser -test.ts - the main entry poin tfor your unit tests

What is one-way data binding? Two-way data binding?

*one-way binding will bind the data from component to the view(DOM) or other way around. unidirectional *two-way binding gives components a way to share data. used to listen for events and update values silmutaneously between parent and child components

How do I perform the different data bindings?

*one-way: -from component to view - Interpolation binding (binding expressions into marked up language); Property binding (setting the property to the value of the expression); Attribute binding (setting an attribute property of a view element); Class binding (setting a class property of a view element); syntax {{}} as an element -from view to component - using the event binding technique (declaring a target event (click) within an element) *two-way - by importing the @angular/forms (FormsMOdule) and nesting the [(NgModel)] within an input element

How do I pass state between a parent and a child component?

@input

What is Angular?

Angular is a platform and framework for building single-page client applications using HTML and TypeScript.

What is the difference between AngularJS and Angular 4+?

AngularJS had features link controllers where Angular 4+ replace these features with components and directives

What is event binding?

Event binding is used by directives and components to define element behavior for a particular event. Use the event emitter (event) = "behavior" to bind event behavior to the element.

How do I perform routing?

Import RouterModule and Routes into your routing module Define your routes in your Routes array Add you route to you application

What is typescript?

Programming language that transpiles into Java EcmaScript 3. It contains access modifiers, classes, interfaces, Unit testing through Jasmine, and Decorators

What is the difference between promises and observables?

Promise can provide a single value, whereas the observable is a stream of values

What is RxJS?

Reactive Extensions for JavaScript Is a library for composing asynchronous and event-based programs by using observable sequences

What is the purpose of Angular?

To develop single page applications

What are modules?

a place where you can group the components, directives, pipes, and services

What are pipes?

a simple function to use in template expressions to accept an input value and return a transformed value

What is property binding?

a way to set values for properties of HTML elements or directives

What are some common Angular CLI commands?

add, build, config, doc, generate

What are directives?

classes that add additional behavior to elements in your angular applications

What are services?

classes with a well defined purpose typically for processing data making it separate from components in order to increase reusability

What is the purpose of components and HTML templates?

components: the main building block for angular applications. they each have a HTML template and a Typescript class to define the behavior and declare what renders. HTML templates: tells angular how to render the component

What is the purpose of package.json?

contains information about your web appliaction

What is string interpolation?

defining a string in ts file and rendering in html with {{}}

How do I send HTTP requests in Angular?

import HttpClient, HttpHeaders then call the method on a HttpClient object

What are the different lifecycle methods that can be used with components?

ngOnInit ngOnDestory ngOnChange

What is the purpose of npm and webpack?

npm is the package manager for the Node JavaScript platform. it puts the modules in place so that node can find them webpack is a static module bundler for Javascript applications. it takes modules regardless of autogenerated or custom, and converts them to static assets

What are the different access modifiers of TS?

public, private, protected

What is linting?

static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs

What is bundling?

the process of joining multiple files into a single file

What is routing?

way to navigate from one view to another as users perform tasks in web apps


Ensembles d'études connexes

Life Insurance Policy Provisions, Riders, and Options

View Set

Virtual lab 3B- Blood pressure and pulse

View Set

Literature Terms Fall Master List

View Set

Principles of Financial Accounting Chapter 2 (College Accounting 15th Edition)

View Set

Series 66 QBank Missed Questions Set 2

View Set