@Yagami2k04 wrote:
index.html
<html ng-app="ionicApp">
<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>
<ion-nav-bar class="bar-positive">
</ion-nav-bar>
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-view name='acceuil' ></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-nav-view name="sidemenu" ></ion-nav-view>
</ion-side-menu>
</ion-side-menus>
</body>
</html>
template/sidemenu.html<ion-list>
<ion-item> menu 1</ion-item>
<ion-item> menu 2</ion-item>
<ion-item> menu 3</ion-item>
</ion-list>
template/acceuil.html<ion-header-bar class="bar-positive">
<h1>Acceuil</h1>
</ion-header-bar>
app.jsvar app = angular.module('ionicApp', ['ionic'])
app.config(function($stateProvider,$urlRouterProvider){
$urlRouterProvider.otherwise("/acceuil")
$stateProvider.state(acceuil,{
url(/acceuil),
views{
acceuil:{
templateUrl:'template/acceuil.html'
}
}
})
$stateProvider.state(sidemenu,{
url(/sidemenu),
views{
acceuil:{
templateUrl:'template/sidemenu.html'
}
}
})
it show me : Uncaught Error: [$injector:modulerr] Failed to instantiate module ionicApp due to:
Error: [$injector:nomod] Module 'ionicApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Posts: 6
Participants: 2