Category: IONIC with Restful API

Example 5: Client Login / Logout With $http.post() No ratings yet.

This example will show you how to post data to Restful server by using $http.post() in order to demonstrate login and logout functions. Besides, it will use window.localStorage to store the login information. Please follow below steps: Update C:\workspace_ionic\itBlogsApp\www\templates\menu.html by changing: <ion-item menu-close ng-click=”login()”>Login</ion-item> to <ion-item menu-close ng-click=”login()”>{{loginout}}</ion-item>   Update C:\workspace_ionic\itBlogsApp\www\templates\login.html by changing: <h1 class=”title”>Login</h1>