Hegemon
Hegemon

Reputation: 433

AngularJS: How to create a one time page?

I am wondering how one would create a one time page in angularjs. As an example, a user enters his details into a form and submits. If the submission is successful, the user is forwarded to a "thank you" which is only accessible once otherwise forward to the home page for instance. Something similar to the traditional flash message.

Upvotes: 1

Views: 93

Answers (3)

ECMachado
ECMachado

Reputation: 31

If what you want to show is a simple "thank you" screen, my advice would be to keep it simple and use a modal splash. It's what I usually do.

Check out this very good example (and demo here).

Upvotes: 3

Amr Elgarhy
Amr Elgarhy

Reputation: 68922

I am new to angular, but I think you can set a $scope variable such as 'allowVisit' and set it to true if you need to allow viewing the thank you page, and If the thank you page found this variable false, it should change the location to /home

Upvotes: 1

Artyom Pranovich
Artyom Pranovich

Reputation: 6962

I suggest to use Toastr in that case.

Here you can find more examples.

Upvotes: 1

Related Questions