TypeScript
Angular
Angular Fundamentals
Javascript
Html/Css
100

What Is Typescript?

Its a superset of javascript that compiles down to plain javascript. At the end of the day its still javascript and allows us to use all of the es6 features of javascript.

100

What Is Angular?

A framework and platform used to create SPA's. It operates under the MVVM (Model-View-ViewModel) Architecture. It also uses typescript and has a lot of built in out of the box functionality.  

100

Some examples of built in modules in angular?

HttpClientModule

Router Module

Forms Module

BrowserModule

*Custom Modules can be made as well*

100

What is a promise?

A promise is an object that lets us handle the return, success, and failure of an asynchronous request. It takes a callback method that has a resolve and reject arguments and we can then decide what happens after that promise has returned by using the .then() and .catch() to handle the success and the failure respectively

100

What is the difference between the ‘id’ attribute and the ‘class’ attribute of HTML elements?

Multiple elements in HTML can have the same class value, whereas a value of id attribute of one element cannot be associated with another HTML element.

200

Pro's and Con's of Typescript?

Type Safety. Better organization. Rich IDE Support. Readability. Easier Bug Catching. Cross-browser and cross platform compatibility 

200

Difference between Angular and React?

Angular operates on principles of OOP while react is Functional.

Angular has form validation and handling. React doesnt.

Angular has a built in HTTPCLIENT module to make http requests. React does not offer one natively.

Angular has 2 way data-binding. React is Unidirectional.

200

What are the ways we can communicate between components?

@Input Decorator: Parent to Child Relation

@Output Decorator: Child to Parent relation*Also needs an event emitter attached*

Service: Sibling components, and unrelated components *Uses dependency injection to pass the data into the components with the @Injectable decorator

*Bonus: ViewChild: Research This!

200

how would i get a value from an input field using vanilla javascript

selector.value

200

What are the different values for CSS positioning? 

  1. static: Default value. Here the element is positioned according to the normal flow of the document.
  2. absolute: Here the element is positioned relative to its parent element. The final position is determined by the values of left, right, top, bottom.
  3. fixed: This is similar to absolute except here the elements are positioned relative to the <html> element.
  4. relative: Here the element is positioned according to the normal flow of the document and positioned relative to its original/ normal position.
  5. initial: This resets the property to its default value.
  6. inherit: Here the element inherits or takes the property of its parent
300

What is "TSC" and how does it work?

TypeScript Compiler, and it transpiles typescript code down to ES5

300

What are some angular CLI commands?

ng new my-app(making a new project)

ng generate component (make new component)

ng generate service (make new service)

ng build (to build our application)

ng serve (to serve our application to our localhost)

*plus a lot more*

300

What are services and dependency injection?

Services are singleton classes that are used to share data across components that need it. Dependency Injection is taking the data from a service and INJECTING it into the components that need it. 

300

what are the ways we can create an object?

Object Literals

Constructor Functions

Object.Create

300

What is the difference between “display: none” and “visibility: hidden”, when used as attributes to the HTML element.

When we use the attribute “visibility: hidden” for an HTML element then that element will be hidden from the webpage but still takes up space. Whereas, if we use the “display: none” attribute for an HTML element then the element will be hidden, and also it won’t take up any space on the webpage.

400

What is an Interface?

A group of key/value pairs used to define a collection of your data and group them together

400

If we make a new component, where do we have to import that component in order to use it in our application?

In our module.ts file. Specifically into the declarations array in our NgModule.

400

What are the different types of directives and examples of built in directives for each type?

*Bonus: can we make our own directive?

Components: A directive with its own template attached to it.

Structural Directives: These are used to add or remove HTML from the dom. *Built in: ngFor, ngif

Attribute Directives: Changes the feel of our dom by adding or removing styles, classes, and properties from out HTML. *Built in: ngStyle, ngClass

*There are a few more built in directives. 

*Custom attributes do exist to allow us to create directives with custom settings to be used.

400

What are the main primitive datatypes in javascript?

String

Number

Boolean

Null

Undefined

400

In how many ways can we specify the CSS styles for the HTML element?

There are three ways in which we can specify the styles for HTML elements:

  • Inline: Here we use the ‘style’ attribute inside the HTML element.
  • Internal: Here we use the <style> tag inside the <head> tag. To apply the style we bind the elements using ‘id’ or ‘class’ attributes.
  • External: Here we use the <link> tag inside <head> tag to reference the CSS file into our HTML code. Again the binding between elements and styles is done using ‘id’ or ‘class’ attributes.
500

What Are Decorators?

Functions that can be attached to classes in order to change the behavior of a class. We use the "@" to denote when we are using a decorator

500

What are the parts that make up a component?

Selector: the custom css-selector that will be used to place our components template into the html

templateUrl: the file for our html template. *Can also include template in this area without the need of making a separate html file*

styleUrls: An array of stylesheets can be added in this area. 

500

What forms of data-binding does angular accept?

String Interpolation

Property Binding

Event Binding

*IMPORTANT* 2-way Data Binding

500

Explain Call, Apply, and Bind methods

Call: This method invokes a method by specifying the owner object. Call allows an object to use the methods of another object

Apply: Very similar to the call method except apply method takes arguments as an array where call takes arguments separately

Bind: this method returns a new function where the value of "this" will be bound to the owner object.

500

 What are Semantic Elements? Why are they important?

Semantic elements are those which describe the particular meaning to the browser and the developer. Elements like <form>, <table>, <article>, <figure>, etc., are semantic elements.

They allow us to organize our html and structure it for better readability, structure, and allows anyone coming after us to easily understand our code base.