Skip to content

Instantly share code, notes, and snippets.

@IgorMinar
IgorMinar / gist:1028816
Created June 16, 2011 07:09 — forked from pmenglund/gist:1028805
Angular
<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) {
<!doctype html>
<html xmlns:ng="http://angularjs.org/">
<head>
<title>angular invoice demo</title>
<script src="http://code.angularjs.org/angular-0.9.10.html" ng:autobind></script>
</head>
<body>
<table ng:init="invoice= {items:[{qty:10, description:'gadget', cost:9.95}]}">
<tr><th>Qty</th><th>Description</th><th>Cost</th><th>Total</th><th></th></tr>
<tr ng:repeat="item in invoice.items">
<!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>