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
ngOnInit() { | |
this.example = this.route.params | |
.switchMap(params => this.exampleService.getExample(params.id)); | |
} |
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
class AppComponentController {} | |
export const AppComponent { | |
bindings: { | |
products: '=', | |
sort: '&' | |
}, | |
controller: AppComponentController | |
} |
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
"format register"; | |
System.register("angular2/src/facade/lang", [], true, function(require, exports, module) { | |
var global = System.global, | |
__define = global.define; | |
global.define = undefined; | |
var __extends = (this && this.__extends) || function(d, b) { | |
for (var p in b) | |
if (b.hasOwnProperty(p)) | |
d[p] = b[p]; | |
function __() { |
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
"format register"; | |
System.register("rxjs/util/noop", [], true, function(require, exports, module) { | |
var global = System.global, | |
__define = global.define; | |
global.define = undefined; | |
function noop() {} | |
exports.noop = noop; | |
global.define = __define; | |
return module.exports; | |
}); |
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
var a = [{q : 2}, {q : 3}]; | |
var qs = a.map(function(obj){ return obj.q }); | |
//how will i use a 'for' loop to return a new array like that will look like this [2, 3] ? |
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
function processVertex(parent, vertices, children) { | |
var vertex = null, vertexChildren = null; | |
if (children && angular.isArray(children)) { | |
_.each(children, function(id) { | |
// find child in old data model by vertex id | |
vertex = _.find(vertices, { vertexId: id }); | |
if (vertex) { |
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 * as di from './annotations'; | |
const Inject = (...dependencies) => { | |
return (classDef) => { | |
di.annotate.apply(di, [classDef].concat(dependencies.map((dep) => new di.Inject(dep)))); | |
} | |
} | |
const Provide = (targetClassDef) => { | |
return (classDef) => { |
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
//returns array of users | |
function getUser(){ | |
return fetch('user.json'); | |
} | |
function getAccountsForUser(user){ | |
return fetch(`users/${user.id}/accounts`); | |
} | |
function getPropertiesForAccount(account){ |
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
(function(){ | |
app.factory('JWT', JWT); | |
function JWT($window, $q){ | |
var store = $window.localStorage; | |
var key = 'AXC_API_Storage.Token'; | |
var service = { | |
getToken: getToken, |
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
SomeService.placeSearch(options).then(function(results){ | |
res.json(results); | |
}) |
NewerOlder