code: function (url) {
          var self = this;
          this.searching = true;
          this.loadingError = false;
          return $http.get(url)
            .success(function (res) {
              self.searching = false;
              return res.data;
            })
            .error(function () {
              self.searching = false;
              self.loadingError = true;
              return false;
            });
        }
docs: Get component list from API