app/scripts/controllers/material/materialSearch.js
/**
   * Build `pokemons` list of key/value pairs
   */
Build `pokemons` list of key/value pairs
Build ` pokemons ` list of key / value pairs
function loadAll() {
    let getAll = '?limit=151'
    return $http({
      method: 'GET', url: BASEURL + getAll
    })
    .then(function (result) {
      return result.data.results.map(function (pokemon) {
        let pokeNumber = pokemon.url.split('/')
        return {
          pokemon:          pokemon.name,
          pokedex_national: pokeNumber[pokeNumber.length - 2]
        };
      });
    }, function (result) {
      $log.info("Error: No data returned");
    });
  }
function loadAll ( ) { let getAll = '?limit=151' return $http ( { method : 'GET' , url : BASEURL + getAll } ) . then ( function ( result ) { return result . data . results . map ( function ( pokemon ) { let pokeNumber = pokemon . url . split ( '/' ) return { pokemon : pokemon . name , pokedex_national : pokeNumber [ pokeNumber . length - 2 ] } ; } ) ; } , function ( result ) { $log . info ( "Error: No data returned" ) ; } ) ; }
Build `pokemons` list of key/value pairs
Build ` pokemons ` list of key / value pairs