'use strict';

angular.module('core').controller('itemController', ['$scope', 'Authentication', 'itemService'
	function($scope, Authentication, itemService) {
		// This provides Authentication context.
		$scope.authentication = Authentication;
	
	// Some example string - remove in prod
        $scope.helloText = 'Item Test';


    	$scope.items = itemService.query();
		$scope.newItem = "";

	$scope.post = function() {
		itemService.save({created_by: $scope.authentication.user, UPC: $scope.newItem, created_at: Date.now()}, 
		function(){
			$scope.items = itemService.query();
			$scope.newItem = "";	
		});
	};
	$scope.delete = function(item)	{
		itemService.delete({id: item._id});
		$scope.item = itemService.query();
	};

	}
]);

@@ -102,16 +102,17 @@
 Service'
+,
 %0A%09functi

Update item.client.controller.js