I'm using the Onsen UI as a part of the Sensation App. I'm trying to duplicate a page and have duplicated the html pages, data.js, and app.js with the appropriate information. Whenever I launch the app to my phone, I try to click my new page. It doesn't load. I also can't open any other page on my sensation. Please help. Thanks!
//Data.JS
var sensationApp = angular.module('sensationApp');
// Home Data: Home page configuration
sensationApp.factory('Data', function(){
var data = {};
data.items = [
{
title: 'ABOUT BN',
icon: 'home',
page: 'aboutbn-master.html'
},
{
title: 'ABOUT ALPHA',
icon: 'university',
page: 'posts.html'
},
{
title: 'LINEAGE',
icon: 'sort-numeric-asc',
page: 'categories.html'
},
{
title: 'BNSTYLE',
icon: 'shopping-cart',
page: 'products.html'
},
{
title: 'BNTUNE',
icon: 'cloud-upload',
page: 'news.html'
},
{
title: 'BNVOLVED',
icon: 'users',
page: 'contact.html'
},
{
title: 'GALLERY',
icon: 'camera',
page: 'gallery.html'
},
{
title: 'EVENTS',
icon: 'calendar',
page: 'serverposts.html'
},
{
title: 'THE TORCH',
icon: 'fire',
page: 'categories.html'
}
];
return data;
});
sensationApp.factory('AboutBNData', function(){
var data = { url: 'http://bnorbeout.com/?json=get_category_posts&slug=events&' };
return data;
});
//home.html
<ons-navigator title="BNorBeOut" var="appNavigator">
<ons-page ng-controller="HomeController">
<ons-toolbar fixed-style>
<div class="left">
<ons-toolbar-button onclick="menu.toggleMenu()">
<ons-icon icon="bars">
</ons-toolbar-button>
</div>
<div class="center">BNorBeOut</div>
<div class="right">
<ons-toolbar-button onclick="appNavigator.pushPage('contact.html',{title: 'CONTACT US', animation: 'slide'})">
<ons-icon icon="envelope">
</ons-toolbar-button>
</div>
</ons-toolbar>
<ons-scroller>
<section style="padding: 0 10px 0 0;">
<center><img ng-src="img/BNLogo.png" alt="The House that Chapman Built"/></center>
</section>
<section class="home-grid">
<div class="grid-menu">
<div class="centering-and-alignment" ng-repeat="row in items | partition:3">
<div class="grid-menu-item list__item list__item--tappable" ng-repeat="item in row" ng-click="showDetail(($parent.$index*row.length)+$index);">
<ons-icon style="color: #BB8B09" icon="{{item.icon}}"></ons-icon>
<div class="grid-menu-item-label">{{item.title}}</div>
</div>
</div>
</div>
<ons-list class="list-top">
<ons-list-header>BUY TICKETS</ons-list-header>
<ons-list-item modifier="chevron" ng-click="loadURL(http://tallahassee.moonevents.com/events/chillmatic-0)">
<ons-row>
<center><img ng-src="img/Chillmatic2015.jpg" alt="Chillmatic 2015"/></center>
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
<ons-list class="list-top">
<ons-list-header>CONTACT</ons-list-header>
<ons-list-item modifier="chevron" ng-click="appNavigator.pushPage('parameters-master.html')">
<ons-row>
<ons-col width="15%">
<ons-icon icon="level-up" fixed-width="true"></ons-icon>
</ons-col>
<ons-col class="left">
2115 S. Martin Luther King Jr. Blvd., Tallahassee, FL 32301
</ons-col>
</ons-row>
<ons-row>
<ons-col width="15%">
<ons-icon icon="level-up" fixed-width="true"></ons-icon>
</ons-col>
<ons-col class="left">
414-841-2407
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
</section>
</ons-scroller>
</ons-page>
</ons-navigator>
//AboutBN-Master.html
<ons-page ng-controller="AboutBNController">
<ons-toolbar>
<div class="left"><ons-back-button>Back</ons-back-button></div>
<div class="center">Events</div>
</div>
</ons-toolbar>
<ons-pull-hook ng-action="load($done)" var="loader">
<span ng-switch="loader.getCurrentState()">
<span ng-switch-when="initial"><ons-icon size="35px" icon="ion-arrow-down-a"></ons-icon> Pull down to refresh</span>
<span ng-switch-when="preaction"><ons-icon size="35px" icon="ion-arrow-up-a"></ons-icon> Release to refresh</span>
<span ng-switch-when="action"><ons-icon size="35px" spin="true" icon="ion-load-d"></ons-icon> Loading data...</span>
</span>
</ons-pull-hook>
<section style="padding: 10px;">
<ons-list class="status-bar feeds">
<ons-list-item>{{status_bar}}</ons-list-item>
</ons-list>
<ons-row style="padding: 10px 0 20px 0;">
<input type="search" placeholder="Search" class="search-input" ng-model="search">
</ons-row>
<div ng-repeat="post in getAboutBN()">
<ons-row style="padding: 0 0 20px 0;">
<ons-col>
<h3 class="title" ng-bind-html="post.title" ng-click="showSearchDetail($index)"></h3>
<a ng-click="showSearchDetail($index)">
<img class="post-teaser-image" ng-src="{{post.attachments[0].images.thumbnail.url}}" ng-show="{{post.attachments.length}}"/>
</a>
<p class="post-excerpt" ng-bind-html="post.excerpt"></p>
<ons-button class="post-teaser" modifier="quiet" ng-click="showSearchDetail($index)">Read more</ons-button>
</ons-col>
</ons-row>
</div>
<ons-list class="status-bar feeds">
<ons-list-item>{{status_bar}}</ons-list-item>
</ons-list>
<ons-row align="center">
<ons-col>
<ons-button ng-show="hasMoreItems()" ng-click="showMoreItems()" class="load-show-more"><i class="fa fa-angle-double-down more-icon"></i>Load more</ons-button>
</ons-col>
</ons-row>
<ons-row align="center" class="status-message">
<ons-col>
<span class="loading"><i class="fa fa-spin fa-circle-o-notch"></i> Loading</span>
<span ng-bind="msg"></span>
</ons-col>
</ons-row>
</section>
</ons-page>
I found out the issue. I had to name the controllers differently in app.js. The master controller should match the data throughout, and the detail control should only be referenced once.
Related
I want some values from one ons-template to another, i have tried sending values from ons-template to controller and getting back to another ons-template from a controller, but is there any way i can get the values directly from one ons-template to another without calling the controller? Below is my code.
sendmoney.html
<ons-template id="sendmoney.html">
<ons-page modifier="shop-details" class='page_bg'>
<ons-toolbar style="background-color: #16A500;">
<div class="left">
<ons-toolbar-button ng-click="menu.openMenu();">
<ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">Send Money</div>
<div class="right">
<ons-toolbar-button onclick="doContactPicker()">
<ons-icon icon="ion-plus" size="28px" fixed-width="false"></ons-icon>
</ons-toolbar-button>
</div>
</ons-toolbar>
<div ng-controller="getUserContacts">
<ons-list-header>Select Contact</ons-list-header>
<ons-list style="margin: -1px 0">
<div ng-show="loading" class="loading"><img src="img/loading.gif" height="50px" width="50px"></div>
<ons-list-item modifier="chevron" class="list-item" ng-repeat="x in contacts track by $index" style="margin-left: 10px;" ng-click="page.pushPage('sendmoney2.html', {animation: 'slide'});">
<ons-row>
<ons-col width="52px" style="padding: 10px 0 0 0;">
<img src="img/red.png" height="42px" width="42px"/>
</ons-col>
<ons-col>
<header>
<span class="item-title">{{x.name}}</span>
</header>
<p class="swipe-item-desc">{{x.phone}}</p>
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
</div>
</ons-page>
</ons-template>
I want {{x.name}} and {{x.phone}} in sendmoney2.html template
sendmoney2.html
<ons-template id="sendmoney2.html">
<ons-page modifier="shop-details" class='page_bg'>
<ons-toolbar style="background-color: #16A500;">
<div class="left">
<ons-toolbar-button ng-click="menu.openMenu();">
<ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">Send Money</div>
</ons-toolbar>
</ons-page>
</ons-template
I don't know Angular very well, but in plain JS, you simply set a global variable to get around this. I think of the app design as just one large web page. That often helps me solve my problems. So basically just define these in the top of your script:
var vName = '';
var vPhone = '';
Then set them in the events, this should work.
I´m using the swipe gesture to navigat to a page / template.
If I swipe to the left, I want to fade in / fade out the like-col for 5 Seconds.
If I swipe to the right, I want to fade in / fade out the pass-col for 5 Seconds.
After fading out the like-col or pass-col, both gestures should navigate to the template match1.html.
Currently the columns appear shortly after 5 seconds and it goes directly to the template match1.html
What am I doing wrong? Thank you for your tips.
var app = angular.module('myApp', ['onsen', 'ngSanitize', 'ngRoute', 'onsen.directives', 'ngTagsInput']);
app.controller('findPatientsController', function($scope, $route, $window, $timeout) {
$scope.startFindPatient = function() {
$timeout(function() {
findPatientsNavigator.pushPage('match1.html', {
animation: 'slide'
});
}, 1000);
};
$scope.swipe = {
active: false
};
$scope.onGestureMatch1 = function(gesture) {
if (gesture == 'Swipe Left') {
console.log('like');
$scope.swipe.like = !$scope.swipe.like;
$timeout(function() {
findPatientsNavigator.pushPage('match2.html', {
animation: 'slide'
});
}, 5000);
}
if (gesture == 'Swipe Right') {
console.log('pass');
$scope.swipe.pass = !$scope.swipe.pass;
$timeout(function() {
findPatientsNavigator.pushPage('match2.html', {
animation: 'slide'
});
}, 5000);
}
}
});
<ons-navigator animation="slide" ng-controller="findPatientsController" var="findPatientsNavigator">
<ons-page id="introFindPatientsPage">
<ons-toolbar>
<div class="left">
<ons-toolbar-button ng-click="slidingMenu.toggleMenu()">
<ons-icon icon="bars"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">
Schnellsuche
</div>
</ons-toolbar>
<ons-gesture-detector ng-swipeleft="onGestureStart('Swipe Left')" ng-swiperight="onGestureStart('Swipe Right')">
<div id="detect-area" style="width: 100%; height: 500px;">
<div class="searchInfo" ng-init="startFindPatient()">
<span class="searchText"><i class="fa fa-search"></i> Search...</span>
</div>
</div>
</ons-gesture-detector>
</ons-page>
<ons-template id="match1.html">
<ons-page id="match1Page">
<ons-toolbar>
<div class="left">
<ons-toolbar-button ng-click="slidingMenu.toggleMenu()">
<ons-icon icon="bars"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">
Neuer Match
</div>
</ons-toolbar>
<ons-gesture-detector ng-swipeleft="onGestureMatch1('Swipe Left')" ng-swiperight="onGestureMatch1('Swipe Right')">
<ons-row class="swipeRow">
<ons-col width="80px" ng-show="swipe.like" class="like-col col ons-col-inner">
<div class="info-unit">
<ons-icon icon="fa fa-star fa-likePass"></ons-icon>
</div>
</ons-col>
<ons-col class="id-col col ons-col-inner">
<div class="newMatch-id">peterson</div>
<div class="newMatch-birthdate">40 Jahre</div>
</ons-col>
<ons-col width="80px" ng-show="swipe.pass" class="pass-col col ons-col-inner">
<div class="info-unit">
<ons-icon icon="fa fa-times fa-likePass"></ons-icon>
</div>
</ons-col>
</ons-row>
<div class="newMatch">
<div ng-controller="GaugeController">
<div gauge-chart percent="matchGauge1"></div>
</div>
<ons-row>
<div class="matching-list-item-container">
<div class="heading-matching-list"><i class="fa fa-stethoscope"></i> Übereinstimmungen</div>
<div ng-controller="tagsMatchingController" class="matchingTag">
<div class="tags">
<ul class="tag-list">
<li class="tag-item">
<span class="ng-binding">Radiusfraktur</span>
</li>
<li class="tag-item">
<span class="ng-binding">Karpaltunnelsyndrom</span>
</li>
<li class="tag-item">
<span class="ng-binding">Ulnarisrinnen-Syndrom</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</ons-row>
</ons-gesture-detector>
</ons-page>
</ons-template>
<ons-template id="match2.html">
<ons-page id="match2Page">
<ons-toolbar>
<div class="left">
<ons-toolbar-button ng-click="slidingMenu.toggleMenu()">
<ons-icon icon="bars"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">
Neuer Match
</div>
</ons-toolbar>
<ons-gesture-detector ng-swipeleft="onGestureMatch2('Swipe Left')" ng-swiperight="onGestureMatch2('Swipe Right')">
<div class="newMatch">
<div class="newMatch-id">findus</div>
<div class="newMatch-birthdate">32 Jahre</div>
<div ng-controller="GaugeController">
<div gauge-chart percent="matchGauge2"></div>
</div>
<ons-row>
<div class="matching-list-item-container">
<div class="heading-matching-list"><i class="fa fa-stethoscope"></i> Übereinstimmungen</div>
<div ng-controller="tagsMatchingController" class="matchingTag">
<div class="tags">
<ul class="tag-list">
<li class="tag-item">
<span class="ng-binding">Radiusfraktur</span>
</li>
<li class="tag-item">
<span class="ng-binding">Ulnarisrinnen-Syndrom</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</ons-row>
</ons-gesture-detector>
</ons-page>
</ons-template>
</ons-navigator>
I am trying to use multiple files for pages. However, I also want to use the sliding menu. I read here that to use multiple files with Onsen you just remove <ons-template>. I understand this, but I can't get the sliding menu to work with it. Here is what I have.
<body>
<ons-sliding-menu side="left" var="menu" type="reveal" max-slide-distance="260px" swipeable="true">
<div class="menu">
<ons-page>
<ons-list class="menu-list">
<ons-list-item class="menu-item" ng-click="menu.setMainPage('index.php', {closeMenu: true})">
<ons-icon icon="fa-plus" fixed-width="true"></ons-icon>
Today's Meals
</ons-list-item>
<ons-list-item class="menu-item" ng-click="menu.setMainPage('other.php', {closeMenu: true})">
<ons-icon icon="fa-bookmark" fixed-width="true"></ons-icon>
Some other Page
</ons-list-item>
</ons-list>
</ons-page>
</div>
</ons-sliding-menu>
<ons-page>
<ons-toolbar>
<div class="left">
<ons-toolbar-button ng-click="menu.toggle()">
<ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center">Today's Meals</div>
<div class="right weight">277.4 LBS</div>
</ons-toolbar>
<ons-list class="plan-list">
<ons-list-item modifier="chevron" class="plan">
<ons-row>
<ons-col width="80px" class="plan-left">
<div class="plan-date">7:00 AM</div>
</ons-col>
<ons-col width="6px" class="plan-center"></ons-col>
<ons-col class="plan-right">
<div class="plan-name">MEAL 1</div>
<div class="plan-info">
<ul>
<li>2 Chicken Breasts</li>
<li>Blueberries</li>
<li>Side Salad with Ranch</li>
</ul>
</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="chevron" class="plan">
<ons-row>
<ons-col width="80px" class="plan-left">
<div class="plan-date"><ons-icon icon="fa-clock-o"></ons-icon></div>
</ons-col>
<ons-col width="6px" class="plan-center-alt"></ons-col>
<ons-col class="plan-right">
<div class="plan-name">MEAL 2</div>
<div class="plan-info">
No food recorded yet.
</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="chevron" class="plan">
<ons-row>
<ons-col width="80px" class="plan-left">
<div class="plan-date"><ons-icon icon="fa-clock-o"></ons-icon></div>
</ons-col>
<ons-col width="6px" class="plan-center"></ons-col>
<ons-col class="plan-right">
<div class="plan-name">MEAL 3</div>
<div class="plan-info">
No food recorded yet.
</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="chevron" class="plan">
<ons-row>
<ons-col width="80px" class="plan-left">
<div class="plan-date"><ons-icon icon="fa-clock-o"></ons-icon></div>
</ons-col>
<ons-col width="6px" class="plan-center-alt"></ons-col>
<ons-col class="plan-right">
<div class="plan-name">MEAL 4</div>
<div class="plan-info">
No food recorded yet.
</div>
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
</ons-page>
</body>
I am not using this with cordova or phonegap. I am just using this as a framework for a mobile web page.
Thank you!
You just need to wrap the menu page and the main page with <ons-template> like this:
<ons-sliding-menu main-page="main.html" menu-page="menu.html" side="left" var="menu" type="reveal" max-slide-distance="260px" swipeable="true">
</ons-sliding-menu>
<ons-template id="menu.html">
<ons-page>
...
</ons-page>
</ons-template>
<ons-template id="main.html">
<ons-page>
...
</ons-page>
</ons-template>
Hope it helps!
I can't get the navigation to work with the tab bar. I have a list page, search page and details page. For some reason I can't get the list page to persist when navigating either. The details page is never shown even thought I am using app.navi.pushPage('detail.html'). Before adding the tab-bar everything worked fine. Any ideas on what I am doing wrong?
As well, I need to access the detail page from both the list and search pages.
<ons-navigator page="list.html" var="app.navi"></ons-navigator>
<ons-tabbar>
<ons-tab page="favourites.html" label="Favourites" icon="fa-heart"></ons-tab>
<ons-tab page="list.html" label="Near Me" icon="fa-map-marker" active="true"></ons-tab>
<ons-tab page="search.html" label="Search" icon="fa-search"></ons-tab>
</ons-tabbar>
<ons-template id="list.html">
<ons-page id="list-page">
<ons-toolbar>
<div class="center">Near Me</div>
</ons-toolbar>
<ons-list id="lst-estblshmnt"></ons-list>
</ons-page>
</ons-template>
<ons-template id="search.html">
<ons-page id="search-page">
<ons-toolbar>
<div class="center">Search</div>
</ons-toolbar>
<ons-row>
<ons-col>
<input id="srch" type="search" class="search-input">
</ons-col>
<ons-col width="75px" style="display: none">
<ons-button id="btn-cancel-search" modifier="quiet">Cancel</ons-button>
</ons-col>
</ons-row>
<ons-list id="lst-srch"></ons-list>
</ons-page>
</ons-template>
<ons-template id="detail.html">
<ons-page id="detail-page">
<ons-toolbar>
<div class="left"><ons-back-button>Back</ons-back-button></div>
<div class="right">
<ons-toolbar-button id="btn-fllw"><ons-icon icon="fa-heart-o"></ons-icon></ons-toolbar-button>
</div>
</ons-toolbar>
<ons-row>
<ons-col id="establishment-details">
<header>
<center class="item-title">Title</center>
</header>
<div class="item-details">
<ons-row>
<ons-col>
<p class="item-address"></p>
<p class="item-city"></p>
<p class="item-postal_code"></p>
</ons-col>
</ons-row>
</div>
</ons-col>
</ons-row>
</ons-list>
</ons-page>
</ons-template>
You cannot combine <ons-navigator> with <ons-tabbar>. If you use the tabbar element, you can switch pages using setActiveTab(index, [options]). I created a working sample using the template you provided and added a <ons-button> in the list.html template that changes the active page. For more info about the tabbar element, take a look here. Let me know if you need more help :)
<body>
<ons-tabbar var="tabbar">
<ons-tabbar-item
icon="home"
label="Home"
page="list.html"
active="true"></ons-tabbar-item>
<ons-tabbar-item
icon="comment"
label="Comments"
page="search.html"></ons-tabbar-item>
<ons-tabbar-item
icon="gear"
label="Settings"
page="detail.html"></ons-tabbar-item>
</ons-tabbar>
<ons-template id="list.html">
<ons-page id="list-page">
<ons-toolbar>
<div class="center">Near Me</div>
</ons-toolbar>
<ons-list id="lst-estblshmnt"></ons-list>
<ons-button id="btn-switch-search" ng-click="tabbar.setActiveTab(2)">Cancel</ons-button>
</ons-page>
</ons-template>
<ons-template id="search.html">
<ons-page id="search-page">
<ons-toolbar>
<div class="center">Search</div>
</ons-toolbar>
<ons-row>
<ons-col>
<input id="srch" type="search" class="search-input">
</ons-col>
<ons-col width="75px" style="display: none">
<ons-button id="btn-cancel-search" modifier="quiet">Cancel</ons-button>
</ons-col>
</ons-row>
<ons-list id="lst-srch"></ons-list>
</ons-page>
</ons-template>
<ons-template id="detail.html">
<ons-page id="detail-page">
<ons-toolbar>
<div class="left"><ons-back-button>Back</ons-back-button></div>
<div class="right">
<ons-toolbar-button id="btn-fllw"><ons-icon icon="fa-heart-o"></ons-icon></ons-toolbar-button>
</div>
</ons-toolbar>
<ons-row>
<ons-col id="establishment-details">
<header>
<center class="item-title">Title</center>
</header>
<div class="item-details">
<ons-row>
<ons-col>
<p class="item-address"></p>
<p class="item-city"></p>
<p class="item-postal_code"></p>
</ons-col>
</ons-row>
</div>
</ons-col>
</ons-row>
</ons-list>
</ons-page>
</ons-template>
</body>
I want to add a page before my sliding menu page. I succeeded to accomplish that. But, now I can't access menu.toggle();
I logged the menu object, that says undefined. And I've also tried navi.menu but that also doesn't seem to work. This is the closest solution I've got but no menu.toggle
Onsen UI - Using Slide-Menu just for specifics pages here is my code
<ons-navigator title="Navigation" var="navi" page="homePage.html">
</ons-navigator>
<ons-template id="homePage.html">
<ons-page ng-controller="mainPageController">
<ons-toolbar>
<div class="center">PHPTRAVELS</div>
<div class="right">
<ons-toolbar-button>Exit</ons-toolbar-button>
</div>
</ons-toolbar>
<ons-row class="home-page">
<ons-col>
<ons-list>
<ons-list-item modifier="tappable"
style="line-height: 25px; font-size: 12px; padding: 5px;"
ng-show="modules[2].status"
ng-click="navi.pushPage('home.html')">
<ons-row>
<ons-col width="70px" class="ic">
<ons-icon icon="fa fa-building" size="50px"></ons-icon>
</ons-col>
<ons-col>
<div class="title">Hotels</div>
<div class="description">Find the perfect hotel room</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="tappable" style="line-height: 25px; font-size: 12px; padding: 5px;"
ng-show="modules[6].status || modules[7].status">
<ons-row>
<ons-col width="70px" class="ic">
<ons-icon icon="fa fa-plane" size="50px"></ons-icon>
</ons-col>
<ons-col>
<div class="title">Flights</div>
<div class="description">Get the best flight</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="tappable" style="line-height: 25px; font-size: 12px; padding: 5px;"
ng-show="modules[3].status">
<ons-row>
<ons-col width="70px" class="ic">
<ons-icon icon="fa fa-briefcase" size="50px"></ons-icon>
</ons-col>
<ons-col>
<div class="title">Tours</div>
<div class="description">Your vacation awaits</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="tappable" style="line-height: 25px; font-size: 12px; padding: 5px;"
ng-show="modules[1].status">
<ons-row>
<ons-col width="70px" class="ic">
<ons-icon icon="fa fa-car" size="50px"></ons-icon>
</ons-col>
<ons-col>
<div class="title">Cars</div>
<div class="description">Seek a deal on wheels</div>
</ons-col>
</ons-row>
</ons-list-item>
<ons-list-item modifier="tappable" style="line-height: 25px; font-size: 12px; padding: 5px;"
ng-show="modules[0].status">
<ons-row>
<ons-col width="70px" class="ic">
<ons-icon icon="fa fa-leanpub" size="50px"></ons-icon>
</ons-col>
<ons-col>
<div class="title">Blog</div>
<div class="description">Travel news portal</div>
</ons-col>
</ons-row>
</ons-list-item>
</ons-list>
</ons-col>
</ons-row>
</ons-page>
</ons-template>
<ons-sliding-menu
menu-page="menu.html" main-page="home.html" side="left"
var="menu" type="reveal" max-slide-distance="260px">
</ons-sliding-menu>
<ons-template id="menu.html">
<ons-page modifier="menu-page">
<br><br>
<ons-list class="menu-list">
<ons-list-item menuitem class="menu-item selected" ng-click="menu.setMainPage('home.html', {closeMenu: true});">
<i class="glyphicon glyphicon-home"></i>
Home
</ons-list-item>
<ons-list-item menuitem class="menu-item" ng-click="menu.setMainPage('browsehotels.html', {closeMenu: true});">
<i class="glyphicon glyphicon-calendar"></i>
Browse Hotels
</ons-list-item>
<ons-list-item menuitem class="menu-item" ng-click="menu.setMainPage('specialoffers.html', {closeMenu: true});">
<i class="glyphicon glyphicon-gift"></i>
Special Offers
</ons-list-item>
<ons-list-item menuitem class="menu-item" ng-click="menu.setMainPage('blog.html', {closeMenu: true});">
<i class="glyphicon glyphicon-th-list"></i>
Blog
</ons-list-item>
<ons-list-item menuitem class="menu-item" ng-click="menu.setMainPage('mybookings.html', {closeMenu: true});">
<i class="glyphicon glyphicon-user"></i>
My Bookings
</ons-list-item>
<ons-list-item menuitem class="menu-item" ng-click="menu.setMainPage('contactus.html', {closeMenu: true});">
<i class="glyphicon glyphicon-map-marker"></i>
Contact Us
</ons-list-item>
</ons-list>
</ons-page>
</ons-template>
<ons-template id="home.html">
<!-- <ons-navigator var="nav"> -->
<ons-page ng-controller="homeController">
<ons-toolbar>
<div class="left">
<ons-toolbar-button ng-click="menu.toggle();">
<ons-icon icon="ion-navicon" size="28px" fixed-width="false"></ons-icon>
</ons-toolbar-button>
</div>
<div class="center text-center">PHPTRAVELS</div>
<div class="right">
<ons-toolbar-button>
<!-- <ons-icon icon="refresh" size="30px" spin="{{isFetching}}" fixed-width="true"></ons-icon> -->
<ons-icon icon="ion-load-c" ng-show="isFetching" spin="{{isFetching}}"></ons-icon>
</ons-toolbar-button>
</div>
</ons-toolbar>
<div>some text</div>
</ons-page>
</ons-template>
The methods toggle(), open() and close() for the sliding menu are deprecated.
You can use the toggleMenu([options]) method instead: http://onsen.io/reference/ons-sliding-menu.html#method-toggleMenu
It seems like you want a page before the sliding menu so I made a small example:
http://codepen.io/argelius/pen/XJOQwy