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