Skip to content

Instantly share code, notes, and snippets.

@brianpetro
Created August 18, 2016 17:15
Show Gist options
  • Save brianpetro/7821c9ea7aa72afbab593edba6390dfe to your computer and use it in GitHub Desktop.
Save brianpetro/7821c9ea7aa72afbab593edba6390dfe to your computer and use it in GitHub Desktop.
var app = angular.module('myApp', []);
app.directive('account', function () {
return {
restrict: 'E',
scope: {},
template: $('#account-template').html(),
controller: function ($scope, $element, $attrs) {
$scope.subAccountsOpen = false;
$scope.toggleSubAccounts = function () {
$scope.subAccountsOpen = !$scope.subAccountsOpen;
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment