gcardonav 0 Junior Poster in Training

I want to create an option that will reset my page once the user clicks on an alert the controller will reset to original form. I have the alert all set up but I am not sure how to do this. In JavaScript I created a function that did this startANewGame(); which was this

function startANewGame() {
    $('#startNew').click(function() {
        location.reload(true);
        $("input[type=submit]").val("Guess");
        $("input[type=submit]").attr("id","guessButton");
    }); // End of $('#startNew')
}   //End of function startANewGame()

Is there a way to a function such as reload in AngularJS that will do this or do I need to create a function? Here is how my option looks so far in my controller.js file

            else (($scope.allowed - $scope.guessed) < 0)
                {
                    $scope.result = "Game over! The word was: ";    
                    alert($scope.result + $scope.wordToGuess);  
                }

Thank you guys.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.