Encapsulate DB.js in angular constants to help testing

This commit is contained in:
Colin McLeod
2015-05-04 21:54:36 -07:00
parent c297bb6e8e
commit bf04a2cc19
8 changed files with 14 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
angular.module('app').directive('shipyardHeader', ['lodash','$rootScope', 'Persist', function (_, $rootScope, Persist) {
angular.module('app').directive('shipyardHeader', ['lodash','$rootScope', 'Persist', 'ShipsDB', function (_, $rootScope, Persist, ships) {
return {
restrict: 'E',
@@ -6,7 +6,7 @@ angular.module('app').directive('shipyardHeader', ['lodash','$rootScope', 'Persi
scope: true,
link: function (scope) {
scope.openedMenu = null;
scope.ships = DB.ships;
scope.ships = ships;
scope.allBuilds = Persist.builds;
scope.bs = Persist.state;