angularjs - Trouble with Blank Ionic Project (newbie) -


i have given honest shot , spent hours trying resolve via tutorials, examples, , videos. i'm throwing in towel on 1 , in need of sets of eyes. cannot life of me figure out why welcome screen not showing on index! show's "ionic blank start" @ top , in console see "welcome.html" loaded via xhr it's never displayed. here files:

index.html

<!doctype html> <html>   <head>     <meta charset="utf-8">     <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">     <title></title>      <link href="lib/ionic/css/ionic.css" rel="stylesheet">     <link href="css/style.css" rel="stylesheet">      <script src="lib/ionic/js/ionic.bundle.js"></script>      <script src="cordova.js"></script>      <script src="js/app.js"></script>     <script src="js/controllers.js"></script>   </head>   <body ng-app="starter">      <ion-pane>       <ion-header-bar class="bar-stable">         <h1 class="title">ionic blank starter</h1>       </ion-header-bar>       <ion-content>       </ion-content>     </ion-pane>   </body> </html> 

templates/welcome.html

<div ng-controller="welcomectrl">     welcome page </div> <h1>welcome welcome</h1> 

js/app.js

angular.module('starter', ['ionic', 'starter.controllers'])  .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('welcome', {     url: '/welcome',     abstract:true,     templateurl:'templates/welcome.html',     controller:'welcomectrl'   })   .state('sign-up', {     url: '/sign-up',     views: {       tempalteurl: 'templates/sign-up.html',       controller: 'signupctrl'     }   });    $urlrouterprovider.otherwise('/welcome'); }) 

js/controllers.js

angular.module('starter.controllers', [])  .controller('welcomectrl', function($scope) {}) 

add ion-nav-view tag in index.html -

<ion-content>     <ion-nav-view></ion-nav-view> </ion-content> 

this tag necessary when working states. otherwise ionic shows blank screen cannot find render template.

i haven't tested application, can give try , let me know.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -