The ng-show directive can be used to set the visibility of a part of an application.

The value ng-show = "true" makes an HTML element visible.

The value ng-show = "false" makes the element invisible.

The ng-click directive will call the toggle() function of our controller on button click. Note that the ng-show directive is bound to the visible scope variable and will toggle the paragraph’s visibility accordingly.