Skip to content

Instantly share code, notes, and snippets.

View tokafish's full-sized avatar

Thomas Fisher tokafish

  • Plaid
  • San Francisco
View GitHub Profile
@tokafish
tokafish / controller.js
Last active August 29, 2015 13:56
Simple Scopes
app.controller('SimpleController', function($scope) {
$scope.message = 'Hello Angular!';
});
@tokafish
tokafish / edit.html
Last active August 29, 2015 13:56
ngModel and scope inheritance
<div ng-controller="EditController">
<span>{{message}}</span>
<div ng-if="userIsAdmin">
<span>Edit Message</span>
<input ng-model="$parent.message"/>
</div>
</div>
@tokafish
tokafish / edit.html
Last active August 29, 2015 13:56
ngModel and scope inheritance
<div ng-controller="EditController">
<span>{{message}}</span>
<div ng-if="userIsAdmin">
<span>Edit Message</span>
<input ng-model="message"/>
</div>
</div>