@Yagami2k04 wrote:
hi everybody , i get probleme with ion-nav-view on a basic , it not showing me a "slidemenu.html" template , my code is below
<html>
<head>
<link rel="stylesheet" href="http://code.ionicframework.com/1.0.0-beta.1/css/ionic.css" />
<script src="http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="ionicApp">
<ion-side-menus>
<ion-side-menu side="left">
<ion-nav-view name="sidemenu"></ion-nav-view>
</ion-side-menu>
<ion-side-menu-content>
<ion-nav-view name='acceuil'></ion-nav-view>
</ion-side-menu-content>
</ion-side-menus>
</body>
</html>
acceuil.html<ion-header-bar class="bar-positive">
<h1 class="title">Page Acceuil</h1>
</ion-header-bar>slidemenu.html
<ion-list>
<ion-item> menu 1</ion-item>
<ion-item> menu 2</ion-item>
<ion-item> menu 3</ion-item>
</ion-list>
app.jsvar app = angular.module('ionicApp', ['ionic'])
app.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/home")
$stateProvider.state('home', {
url: '/home',
views: {
acceuil: {
templateUrl: 'template/acceuil.html'
}
}
})
$stateProvider.state('sidemenu', {
url: '/sidemenu',
views: {
sidemenu: {
templateUrl: 'template/sidemenu.html'
}
}
})
})
Posts: 1
Participants: 1