Skip to content

Instantly share code, notes, and snippets.

@JonathanZWhite
Created March 15, 2015 00:47
Show Gist options
  • Select an option

  • Save JonathanZWhite/228c01500b8ba6a0a5a0 to your computer and use it in GitHub Desktop.

Select an option

Save JonathanZWhite/228c01500b8ba6a0a5a0 to your computer and use it in GitHub Desktop.
(function() {
'use strict';
ThemeController.$inject = ['$scope', 'User', 'Notifications'];
function ThemeController($scope, User, Notifications) {
var vm = this;
vm.user = {};
vm.saveUser = saveUser;
init();
function init() {
getUser();
}
function getUser() {
User.get({ id: '54b91ee57f0ef0b8062c303c'}, function(resp) {
vm.user = resp;
});
}
function saveUser() {
User.save(vm.user, function(resp) {
Notifications.showSuccess();
});
}
}
angular
.module('controllers.themes', [])
.controller('ThemeController', ThemeController);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment