click below
click below
Normal Size Small Size show me how
Angular/JS
Advanced JS and Angular
Question | Answer |
---|---|
What is Transclusion in Angular | method to include elements from another template. Used in directives to help fill in templates, inherits parent scope data, but has it's own scope. |
What is isolated scope? | Scope utilized by directives. A directive will have it's own scope, which is added to by the parent scope that is calling it. |
Object Oriented Programming (OOP) | Object Oriented Programming (OOP) refers to using self-contained pieces of code to develop applications. |
Inheritance | objects can inherit features from other objects |
Encapsulation | each object is responsible for specific tasks |
Polymorphism | 0bjects can share the same interface—how they are accessed and used—while their underlying implementation of the interface may differ |
closure | a closure is an inner object which has access to all of the variables available in its parent function. |
static vs instance functions | static functions are direct children in a javascript function object, and is only accessable there. Instance functions are set by .prototype, and are available when new objects are 'cloned' from the parent function. |
ECMAScript | The core coding standard that Javascript, jscript and actionscript are based on. |
overload vs override | overload technically does not happen - what does happen is a kind of override - highjacking a pre-existing method and changing the behavior directly, or calling another function to do so. |
super | call the functions of a parent method. the super keyword appears alone and must be used before the this keyword can be used. |
this | The this keyword refers to the function's execution context. |
class | class expressions can be named or unnamed. If named, the name of the class is local the class body only. JavaScript classes are using prototype-based inheritance. |
... | The spread operator allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) or multiple variables (for destructuring assignment) are expected. |
== vs === | === cares about the type of the data as well as the inherent value |
Hoisting | Hoisting is JavaScript's default behavior of moving declarations to the top, so even if you declare a value after it is called, it will work. |
event bubbling | event listeners check for the event happening on child elements of the bound element. this and event.target will be different. |
capturing | similar to bubbling, With capturing, the event is first captured by the outermost element and propagated to the inner elements. |
css flex | flex and inline-flex serve the same sort of purpose as inline-block, without having to set width for the div |
javascript promises | using .then to chain asyncronous functions to map data requests to data model asignment |
call vs apply | both ativate separate functions to provide dynamic data. Call has a static number of arguments, why apply has an array of arguments |
Enumerability | Properties that can be numbered. Show up in for loops, object.keys |
web worker | A web worker is a JavaScript running in the background, without affecting the performance of the page. |
$q | angular's service for dealing with promises. Lets you crreate your own defer funtions, helps deal with asyncronous data. |
Angular expressions | Angular expressions are JavaScript-like code snippets that are mainly placed in interpolation bindings ({{}}) |
currying | designed for the first argument to be ‘prefilled’ before the function itself is fully executed, usually with encapsulated functions |
what is deep linking? | In the context of the World Wide Web, deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website |
event delegation | is a simple technique by which you add a single event handler to a parent element in order to avoid having to add event handlers to multiple child elements. |
onload vs onready | onready has base html loaded, onload has everything |
jsonp | JSONP (as in "JSON with Padding") is a method commonly used to bypass the cross-domain policies in web browsers |
in house directives in angular |