code: function () {
          var self = this;
          $http.get(settingsApi)
            .success(function (data) {
              self.set(data);
              $timeout(function () {
                self.loaded = true;
              });
            })
            .error(function () {
              self.reset();
              $timeout(function () {
                self.loaded = true;
              });
            });
        }
docs: Load settings from server