Logout
The Goal
The task is quite simple. Make a one-button application cause Logout.

What We Are Going to Do
1. Creat and Application
Binding a Button component with a specifically Named route will force an application to Logout. Let's try to make it.
Create a new View and name it
Logout
.Put into a Container, called it
cntLogout
and set up its Item Flex ->Stretch
; Horizontal Alignment ->Center
; Vertical Alignment ->Middle
Place in a Button, name its ID ->
btnLogout
and set up as follows:Value -> "
Logout
"; Width ->100px
Button Type ->
Link
; -> Link Type ->Named Route
; -> Named Route (select) ->logout
That's all and we are done! Your application will log out after clicking on the button. This functionality is available after deployment and running an application.
Last updated
Was this helpful?