Remove "var" before $scope object as this throws and error.