title: AngularJS Philips Hue Project
body: <p>I started working on a little AngularJS - Philips Hue project and I'm kinda stuck...</p>
  
  <p>I'm fairly new to AngularJS... but here goes.</p>
  
  <p>What I want to do is to list the lamps I have, the status of the lamps and a toggler to switch them.</p>
  
  <p>I decided to build a factory (based on this article: <a href="http://davidsalter.com/2013/08/16/using-angular-dot-js-factories-to-get-remote-data/" rel="nofollow">http://davidsalter.com/2013/08/16/using-angular-dot-js-factories-to-get-remote-data/</a>) for the data getting/putting:</p>
  
  <pre><code>app.factory('lampsFactory', function($http) {
    return {
        getLamps: function(callback) {
            $http.get('http://172.16.0.2/api/newdeveloper/lights').success(callback);
        },
        getLampState: function(callback, lampID) {
            $http.get('http://172.16.0.2/api/newdeveloper/lights/'+ lampID).success(callback);
        }
    };
  });
  </code></pre>
  
  <p>The getLamps function works as it should but I don't know how to get lamp data based on an id.
  I tried to add an extra paremeter but that did not work.</p>
  
  <p>Can you please help me and push me in the right direction?</p>
  
  <p>I also have a plunker: <a href="http://plnkr.co/edit/ySa0PVBahM7sxU4lasgP" rel="nofollow">http://plnkr.co/edit/ySa0PVBahM7sxU4lasgP</a></p>
  
  <p>Thanks!</p>