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 paperHandler = function(event) { | |
if(!event.target.value) { | |
value = event.target.checked; | |
} else { | |
value = event.target.value; | |
} | |
$scope.$apply(function() { | |
$scope.workOrder[event.target.getAttribute("ng-model")] = value; | |
}); |
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
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-resource.min.js"></script> | |
<script src="app.js"></script> | |
<script src="controllers.js"></script> | |
<script src="services.js"></script> |
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
/** | |
* This is a sample webhook server that listens for webhook | |
* callbacks coming from Trello, and updates any cards that are | |
* added or modified so everyone knows they are "PRIORITY" | |
* | |
* To get started | |
* * Add your key and token below | |
* * Install dependencies via `npm install express request body-parser` | |
* * Run `node app.js` on a publicly visible IP | |
* * Register your webhook and point to http://<ip or domain>:3123/priority |
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
// I'd love a mixin capability where I supply a route | |
// This route has an object of id=>true's, and for each ID we map on another route | |
// And save it as the data on the object. | |
app.factory("Mixer", ['$firebaseAuth', '$firebaseObject', | |
function($firebaseAuth, $firebaseObject) { | |
var mixer = function(sparseList, verboseList) { | |
var sparseRef = FB.child(sparseList); | |
var verboseRef = FB.child(verboseList); |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({name: 'reFirebase'}) | |
export class ValuesPipe implements PipeTransform { | |
transform(value: any, args?: any[]): any[] { | |
let keys = Object.keys(value), | |
output = []; | |
keys.forEach(key => { |
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 {disableDeprecatedForms, provideForms} from '@angular/forms'; | |
... | |
bootstrap(App, [ | |
disableDeprecatedForms(), | |
provideForms(), | |
... | |
]); |
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 { Router, NavigationEnd } from '@angular/router'; | |
//... | |
declare var ga : any; | |
//.. | |
constructor(private router : Router ) { | |
router.events.filter(e => e instanceof NavigationEnd).subscribe( (n:NavigationEnd) => { |
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 { AppModule, enableProdMode, ApplicationRef } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { AmesAppComponent } from './ames.component'; | |
import { FORM_DIRECTIVES, FormsModule } from '@angular/forms'; | |
import { ROUTER_DIRECTIVES, provideRoutes } from '@angular/router'; | |
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthMethods, | |
AuthProviders, } from 'angularfire2'; | |
import { disableDeprecatedForms, provideForms } from '@angular/forms'; | |
import { routes } from './routes'; |
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 src -iname \*.ts | xargs sed -ibackup 's/moduleId: module.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
import { Component, Input } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { AngularFire, FirebaseListObservable } from 'angularfire2'; | |
import { Observable } from 'rxjs'; | |
declare var firebase: any; | |
interface Image { | |
path: string; |
OlderNewer