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
/** | |
* @license AngularJS | |
* (c) 2010-2012 AngularJS http://angularjs.org | |
* License: MIT | |
*/ | |
/** | |
* Backward compatibility module for AngularJS | |
* @author Vojta Jina <[email protected]> | |
* |
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
/// bootstrap code | |
var myApp = angular.module('myApp', []); | |
//// resource def | |
var pops; | |
pops = function($resource) { | |
return $resource('/pops/: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($ctrlProvider) { | |
$ctrlProvider.provide('FooCtrl', FooCtrl); | |
var export = $ctrlProvider.export; | |
function FooCtrl($http, $scope) { | |
this.scope_ = $scope; | |
this.http_ = $http; | |
} | |
FooCtrl.prototype.publicMethodA = export(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
<html> | |
<head> | |
<script src="http://code.angularjs.org/angular-0.10.3.js" ng:autobind></script> | |
<script> | |
function MyCntrl() { | |
this.list_of_items = ['this', 'that', 'the other']; | |
this.foo = {choice:'that'}; | |
} | |
MyCntrl.prototype = { | |
loadData: 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
<html> | |
<head> | |
<script src="http://code.angularjs.org/angular-0.9.16.min.js" ng:autobind></script> | |
<script> | |
function CalculatorController() { | |
this.integer = /^\d+$/; | |
this.fraction = /^\d+\.*\d*$/; | |
this.difficulty = 877226; | |
this.hashtime = function() { return Math.round(this.difficulty * Math.pow(2, 32) / (this.hashrate * 1000))/(3600*24) }; | |
this.opex = function() { return this.time*24 * this.electricity * this.power / 1000 }; |
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
<html> | |
<head> | |
<script src="http://code.angularjs.org/angular-0.9.16.min.js" ng:autobind></script> | |
<script> | |
var SERVICE_URL = "http://blockexplorer.com/q/getdifficulty"; | |
function FormController($xhr) { | |
this.posint = /^\d+/; | |
this.fetch = function() { | |
var self = this; | |
$xhr('', SERVICE_URL, function(code, response) { |
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
<!DOCTYPE html> | |
<html> | |
<!-- This should be the simplest possible jQuery based CouchApp. Install by uploading to a design document in Futon or putting in _attachments/index.html and running `couchapp push` --> | |
<head><title>Tiny CouchApp</title></head> | |
<body ng:init="dbs = couch.allDbs()"> | |
<h1>Tiny CouchApp</h1> | |
<ul id="databases"> | |
<li ng:repeat="db in dbs"><a href="/_utils/database.html?{{db}}">{{db}}</a></li> | |
</ul> | |
</body> |