So i’m just starting to use the ionic framework, and i’m having some issues. I have been researching angular and angular-ui as well as ionic all day and simply cannot get this to work…Right now i’m simply trying to get a simple state to show.
This is what i have:
app.js:
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('portal', {
url: '/portal',
views: {
'gah': {
templateUrl: 'templates/portal.html'
}
}
})
$urlRouterProvider.otherwise('/portal');
});
and then in my index.html i have (only showing the body cause the rest is clutter):
<body>
<ion-nav-view>
<ion-nav-view name="gah"></ion-nav-view>
</ion-nav-view>
</body>
and in a file called portal and located in a folder called templates (which is located in the www folder) i have:
<div clas="index-bg">
<div class="index-quote">
<p>
Gah
</p>
</div>
<div class="index-logo">
<img src="img/logo.png" />
</div>
<div class="list list-inset">
<label class="item item-input">
<input type="email" placeholder="e-mail">
</label>
<label class="item item-input">
<input type="password" placeholder="password">
</label>
</div>
<div class="row">
<div class="col col-offset-33">
<button class="button button-dark">
Sign In
</button>
</div>
<div class="col">
<button class="button button-dark">
Sign Up
</button>
</div>
</div>
</div>
Why am i getting a white screen when i try to run my app?