Skip to content

Instantly share code, notes, and snippets.

View nathanbarrett's full-sized avatar

Nathan Barrett nathanbarrett

View GitHub Profile
@nathanbarrett
nathanbarrett / auth.service.js
Created April 25, 2016 18:59
Basic Auth Service for Angular
/*
* Angular Service for authentication
*
* @params none
*
* @returns none
*/
AuthService.$inject = ['$location', 'ExceptionService'];
@nathanbarrett
nathanbarrett / edmunds.service.js
Created November 7, 2015 16:42
Angular service that interacts with Edmunds Api
/*
* Angular service for working with the edmunds api
*
* How to use:
* 1. Include in controller
* 2. $scope.vehicle = EdmundsService.vehicle
* 3. Put a watcher on $scope.vehicle and send the new value to EdmundsService.updateVehicle(vehicle)
* 4. Check edmundsConfig and constants. Adjust as necessary.
*
* @params $http, ExceptionService