Develop

recommended:

```javascript
.factory('Deck', function($http){
  var service = {
    load: function(){
      return $http.get('/path/to/cards.json').then(function(data){
        service.cards = // { whites: { card_id: { text: ". . .", priority: 0 }, card_id: . . . }, blacks: { . . . } }
      })
    }, // END init
    shuffle: function(){
        // shuffle service.cards.whites, service.cards.blacks
    },
    nextWhite: function(){
      // return the next white card, setting its priority to 0 afterward
    },
    nextBlack: function(){
      // return the next black card, setting its priority to 0 afterward
    }
  };

  return service;
})
.controller('ExampleCtrl', function(Deck){
  Deck.init().then(Deck.shuffle)
})
```