Created
August 4, 2014 22:26
Revisions
-
kris created this gist
Aug 4, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // Restaurants finder ink.controller('FinderRestaurantCtrl', ['$scope', 'Restaurant', 'Geocoder', function($scope, Restaurant, Geocoder) { // Businesses $scope.businesses = []; // Filters $scope.filters = {}; // Search $scope.lookup = function() { Restaurant.query(function(businesses) { $scope.businesses = businesses; }); } // Lookup address $scope.geocode = function() { var promise = Geocoder.geocodeAddress($scope.filters.location); promise.then( function (result) { $scope.filters.lat = result.lat; $scope.filters.lng = result.lng; }, function (error) { console.log(error.message); } ); } }]);