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
// in Sublime Text, Preferences -> Browse Packages, find HTML-CSS-JS Prettify/scripts/node_modules/js-beautify/js/lib/beautify.js | |
// find the last line of the 'beautify' function, and place the next lines just before 'return sweet_code'; | |
// https://gist.github.com/loopmode/d091bce3b76efaf15d63 | |
// es7 decorators | |
sweet_code = sweet_code.replace(/@\n/g, '@'); | |
sweet_code = sweet_code.replace(/\)@\s/g, ')\n@'); | |
sweet_code = sweet_code.replace(/ @ /g, ' @'); | |
sweet_code = sweet_code.replace(/@\s/g, '\n@'); | |
// destructuring/spread: imports |
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 queryString from "query-string"; | |
let _route = "api/v2.0/"; | |
const headers = { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
}; | |
const verbs = { |
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
// angular 1 | |
import template from './navbar.html'; | |
import './navbar.styl'; | |
let Component = { | |
restrict: 'E', | |
bindings: {}, | |
template, | |
controller: Home |
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 {Component, View, Input, Output, EventEmitter} from 'angular2/core'; | |
import {NgFor, NgClass, NgIf} from 'angular2/common'; | |
import {ROUTER_DIRECTIVES} from 'angular2/router'; | |
import template from './editable.html'; | |
import styles from './editable.css'; | |
import * as alerts from 'Utils/alerts' | |
const headers = { | |
'Authorization': (()=>getJWT())(), | |
'Accept': 'application/json, text/plain, */*', |
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 {Component} from 'angular2/core'; | |
import {NgFor} from 'angular2/common'; | |
import {Http} from 'angular2/http'; | |
import template from './clients.html'; | |
import {CanActivate, OnActivate, ROUTER_DIRECTIVES, RouteConfig} from 'angular2/router'; | |
import {Service} from './clientResource'; | |
import {Client} from '../classes/Client' | |
OlderNewer