technically all that should have been in link function and only $scope.removeItem should be in controller