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 q = require('q'); | |
var MongoClient = require('mongodb').MongoClient; | |
const dbUrl = require('./config').mongoUrl; | |
var dbConnection; | |
function getDb() { | |
if (dbConnection) return q(dbConnection); |
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
name: badges | |
description: A sample web application | |
dependencies: | |
angular: any | |
browser: any | |
transformers: | |
- angular | |
- $dart2js: | |
{'minify':true} |
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.element(document.body).injector().invoke(function($http) { $http.get('/api/').then(console.log.bind(console),console.error.bind(console))}) |
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.module('test2',[]).run(function($http) { $http.get('/api/').then(console.log.bind(console),console.error.bind(console))}); | |
angular.bootstrap( document.createElement("div"),['test2']) |
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
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-toast/paper-toast.html"> | |
<link rel="import" href="../paper-slider/paper-slider.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> |
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 fs = require('fs'); | |
var cheerio = require('cheerio'); | |
var Chance = require('chance'); | |
var chance = new Chance(); | |
function getRandomData(type, hint) { | |
if (type == 'number') { | |
return (Math.random() * 1000000 | 0) / 100; | |
} else if (type == 'boolean') { | |
return Math.random() >= 0.5; |
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
'use strict'; | |
app | |
.directive('twfTransferToScope', function () { | |
return { | |
restrict: 'E', | |
link: function (scope, element, attr) { | |
element.hide(); | |
scope[attr.name] = angular.fromJson(element.text()); | |
} |
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 es = require('event-stream'); | |
var ngDep = require('ng-dependencies'); | |
var toposort = require('toposort'); | |
var ANGULAR_MODULE = 'ng'; | |
module.exports = function angularFilesort (bundleFilter) { | |
var files = []; | |
var angmods = {}; | |
var toSort = []; |
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
@Decorator(selector:'[sample]') | |
class Sample implements AttachAware{ | |
Element _element; | |
Http _http; | |
Sample(this._element, this._http); | |
var sanitizer = const HtmlEscape(); | |
Future<String> getFromDOM(String id) { | |
var sample = document.querySelector(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
function setupHooks(controller) { | |
controller.prototype.deactivate = ['$scope',function($scope) { | |
console.log("deactivating",$scope); | |
}]; | |
controller.prototype.canActivate = ['routeTransitions','$timeout',function(routeTransitions,$timeout) { | |
console.log("activating",routeTransitions.sourceElement); | |
var source = routeTransitions.sourceElement; | |
if (source) { | |
routeTransitions.sourceElement = null; | |
var cloneE = source[0].cloneNode(true); |
OlderNewer