Posts

Showing posts from July, 2018

Ionic 3 Dynamic Side Menu Example

Image
Most of the web apps contain side menu or navigation drawer as the main menu and needs the content or items to be dynamic. This tutorial describes setting up dynamic items or content in the side menu using Ionic 3. In this tutorial I'm using ionic sidemenu starter project refer my previous blog for creating ionic sidemenu starter project. Let's get started... To set up dynamic items or content for side menu we can use Ionic Events  as I'm using in this example. Ionic events is a publish-subscribe style event system for sending and responding to application-level events across the app. In this example, I'm considering a dummy login and logout functionality ie., when the user logs in and logs out the items or content of the side menu will be changed. To begin let's first import Events in app.componenent.ts. app,component.ts import { Component, ViewChild } from '@angular/core'; import { Nav, Platform } from 'ionic-angular'