Skip to content

Instantly share code, notes, and snippets.

@fdietz
fdietz / app.js
Created February 19, 2013 19:18
Recipes with Angular.js: Controllers - Assigning a Default Value to a Model
function MyCtrl($scope) {
$scope.value = "some value";
}
@fdietz
fdietz / app.js
Created February 19, 2013 19:15
Recipes with Angular.js: Controllers - Changing a Model Value with a Controller Function
function MyCtrl($scope) {
$scope.value = 1;
$scope.incrementValue = function(value) {
$scope.value += 1;
};
}
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git