Created
March 15, 2015 00:47
-
-
Save JonathanZWhite/228c01500b8ba6a0a5a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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