Thymeleaf hide button

0

I have a single modal that I call on two pages. I want the ALTERAR CLIENTE button to appear in the modal of page "A" and in page "B" this button disappears. As I said it is the same modal for two different pages and would like to hide the button only on one of the pages.

    
asked by anonymous 03.09.2018 / 15:38

1 answer

0

Good afternoon, you can put a Boolean flag in the controller that takes users to these pages and use th:if to show the button or not. For example:

<button th:if="${podeAlterarCliente} type="button" class="btn btn-secondary">Alterar Cliente</button>

I hope I have helped!

    
19.11.2018 / 16:05