Day 18: Re-Factory-ing

Thursday, June 23, 2016

Topics

Controllers

If code is requesting data from an API or database, it should probably be in a service

Factories

Basic Setup of an Angular Factory (IIFE excluded for brevity)

angular
  .module('myModule')
  .factory('myFactory', myFactory);

function myFactory() {
  var service = {};

  return service;
}

Homework

  • Review today’s commit history
  • We set up the authService factory and created the register property on it. Continue adding additional properties to the factory to refactor the other methods and dependencies in the AuthController

Project

Mutant Office Hours: Source