client/assets/scripts/services/search.js
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;
          });
      }
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;
          });
      }
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 ; } ) ; }
Get component list from API
Get component list from API