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
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
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
"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
class ParentViewCtrl | |
@$inject: ['$scope', '$location'] | |
constructor: (@scope, @location) -> | |
@scope.fun_times = @fun_times | |
@scope.some_ojects = @some_objects | |
fun_times: => | |
console.log "something something" | |
some_objects: [ |
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
innitApp.provider('API',function(){ | |
//temp storage for new collection | |
var _collections = [] | |
//holds model references | |
var _models = {} | |
return { | |
//this fires when the provider is injected | |
$get : ['$resource',function($resource){ |
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
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
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
/** | |
* Find Records | |
* | |
* An API call to find and return model instances from the data adapter | |
* using the specified criteria. If an id was specified, just the instance | |
* with that unique id will be returned. | |
* | |
* @param {Integer|String} id - the unique id of the particular instance you'd like to look up | |
* @param {Object} where - the find criteria (passed directly to the ORM) | |
* @param {Integer} limit - the maximum number of records to send back (useful for pagination) |