Ionic Guards and BehaviourSubjects to Control Access to Your App

Ionic can control access to pages and menu options by using Angular Guards and BehaviourSubjects. This adds to the client side user experience by simplifying navigation and providing a first line of defence against unauthorized access to pages on your site, or mobile app. Bear in mind though that Ionic is using client side javascript which can be easily bypassed on a website, so these techniques are very superficial and need to be supported by server side restrictions to private pages and data.

Custom Async Validation Against a JSON Http Server

Angular custom async validators can be very useful for checking data against a backend server, such as a JSON http service. Async validators are only executed after synchronous validators are marked as valid, which helps to reduce unnecessary calls to the server. In addition, the call to the server can be timed to only happen after a specified period since the last keystroke, thus simulating the effect of a debounce using the RxJS operator debounceTime().