This file contains hidden or 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 mountWrapper(component) { | |
var origCtrl = component.controller; | |
component.controller = function () { | |
setImmediate(function () { | |
var orgid = m.route.param('orgid'); | |
var org = m.prop(null); | |
var route = m.route(); | |
var routeSplit = m.route().split('/'); | |
if (orgid) { |
This file contains hidden or 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 m = require('mithril'); | |
function requestWithFeedback(args) { | |
var completed = m.prop(false); | |
var complete = function() { | |
completed(true); | |
} | |
var data = m.prop(); | |
args.background = true |
This file contains hidden or 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 Promise = require('bluebird'); | |
Promise.longStackTraces(); | |
//var Promise = require('q'); | |
Promise.reject('first thingy') | |
.then(function (a) { | |
console.log('then 1 ' + a); | |
}) | |
.finally(function (x) { | |
console.log('finally 1'); |
This file contains hidden or 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
// Timer to continue counting while using bcrypt. | |
// Demonstrates that the bcrypt functions are asynchronous. | |
;(function() { | |
console.log('start timer'); | |
var x = 1; | |
setInterval(function() { | |
console.log('Timer: ' + x); | |
x++; | |
}, 1000); | |
}()); |
NewerOlder