I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"definitions": { | |
"nameMixin": { | |
"type": "object", | |
"properties": { | |
"nameFirst": {"type": "string"}, | |
"nameLast": {"type": "string"} | |
}, | |
"required": ["nameFirst", "nameLast"] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- include angular --> | |
</head> | |
<body data-ng-app='app'> | |
<div data-ng-controller='MyController as MyController'> | |
<!-- bound once --> | |
Controller Loaded: {{ ::MyController.someModel.controllerLoaded }} | |
<hr/> | |
<!-- two-way binding --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let object = { | |
key: { | |
subkey: 'value', | |
status: 'STATUS' | |
} | |
}; | |
// compact | |
Object.assign( {}, object, { key: Object.assign( {}, object.key, { status: 'PENDING' } ) } ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using show() | |
$scope.garageToggle = function() { | |
$scope.data = { hasWorkEntry: true }; | |
$ionicPopup.show({ | |
title: 'Are you sure you want to open the garage?', | |
content: '<ion-checkbox ng-model="data.hasWorkEntry" ng-checked="data.hasWorkEntry">Mark as Work Entry?</ion-checkbox>', | |
scope: $scope, | |
buttons: [ | |
{text: 'Cancel'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import all | |
import Rx from "rxjs/Rx"; | |
Rx.Observable | |
.interval(200) | |
.take(9) | |
.map(x => x + "!!!") | |
.bufferCount(2) | |
.subscribe(::console.log); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nothing changed here, works as previously. | |
@Effect() actionX$ = this.updates$ | |
.ofType('ACTION_X') | |
.map(toPayload) | |
.switchMap(payload => this.api.callApiX(payload) | |
.map(data => ({type: 'ACTION_X_SUCCESS', payload: data})) | |
.catch(err => Observable.of({type: 'ACTION_X_FAIL', payload: err})) | |
); | |