Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Adding hambuger menu trigger to the CLI splitter template starter

  • ➜  monaca create testApp
    ? Choose a category: Onsen UI and Angular 2
    ? Select a template - Press P to see a preview Onsen UI V2 Angular 2 Splitter

    First off, I’m a total noob to the js side of the world (php guy here). I’ve been playing with monaca and CLI trying different stuff out but still I’m totally lost.

    I’ve been able to add a page … total struggle to figure out what I needed to copy and paste. UGH

    1. I can’t figure out how the swipe action is being triggered.

    2. More importantly, how do I add a hamburger icon and make it trigger to open the menu like the swipe action does.

    This obviously doesn’t do anythign but through promise errors …

    import {Component} from '@angular/core';
      selector: 'ons-page[weather]',
      template: `
          <div class="left" (click)="">
        <div class="right">
          <ons-toolbar-button ng-click="" tappable>
            <ons-icon icon="md-menu"></ons-icon>
          <div class="center">
        <div class="content">
            Weather component.
    export class WeatherPage {
      constructor() {}

  • Onsen UI

    @illuminate3 Looks like you haven’t found the ons-splitter component yet. Have a look here. Don’t forget to add the collapse and swipeable attributes.

    After defining your template you can grab a hold of the ons-splitter-side with something like @ViewChild(OnsSplitterSide) side: OnsSplitterSide; and then use its methods such as Hope it helps.