Advertisement
valix85

TmpComment1

Aug 5th, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. -->Index.html
  2.  
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
  8. <title></title>
  9.  
  10. <link href="lib/ionic/css/ionic.css" rel="stylesheet">
  11. <link href="css/style.css" rel="stylesheet">
  12.  
  13. <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
  14. <link href="css/ionic.app.css" rel="stylesheet">
  15. -->
  16.  
  17. <!-- ionic/angularjs js -->
  18. <script src="lib/ionic/js/ionic.bundle.js"></script>
  19.  
  20. <!-- cordova script (this will be a 404 during development) -->
  21. <script src="lib/dist/ng-cordova.min.js"></script>
  22. <script src="cordova.js"></script>
  23.  
  24. <!-- your app's js -->
  25. <script src="js/app.js"></script>
  26. </head>
  27. <body ng-app="starter">
  28. <ion-pane>
  29. <ion-nav-view></ion-nav-view>
  30. </ion-pane>
  31. </body>
  32. </html>
  33.  
  34.  
  35. -->app.js
  36. // Ionic Starter App
  37.  
  38. // angular.module is a global place for creating, registering and retrieving Angular modules
  39. // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
  40. // the 2nd parameter is an array of 'requires'
  41. var appTpl = angular.module('starter', ['ionic']);
  42.  
  43. appTpl.run(function($ionicPlatform) {
  44. $ionicPlatform.ready(function() {
  45. // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
  46. // for form inputs)
  47. if(window.cordova && window.cordova.plugins.Keyboard) {
  48. cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  49. }
  50. if(window.StatusBar) {
  51. StatusBar.styleDefault();
  52. }
  53. });
  54. });
  55.  
  56. appTpl.config(function($stateProvider, $urlRouterProvider) {
  57.  
  58. $stateProvider
  59. .state("home", {
  60. url: "/home",
  61. templateUrl: "template/home.html",
  62. controller: "homeController",
  63. })
  64. .state("help", {
  65. url: "/help",
  66. templateUrl: "template/help.html",
  67. controller: "helpController",
  68. })
  69. .state("service", {
  70. url: "/services",
  71. templateUrl: "template/services.html",
  72. controller: "servicesController",
  73. })
  74. .state("service", {
  75. url: "/services/:idservice",
  76. templateUrl: "template/service.html",
  77. controller: "serviceController",
  78. });
  79.  
  80. });
  81.  
  82.  
  83.  
  84. appTpl.controller("homeController", function($scope, $ionicLoading){
  85. $ionicPlatform.ready(function(){
  86. $ionicLoading.show({template: "Loading..."});
  87. /*
  88. if (window.cordova){
  89. //istanzio il db con dbcopy o altro
  90. }else{
  91. //istanzio con localstorage
  92. //db = openDatabase("websql.db", "1.0","My Local WebSQL DB", 2 * 1024 * 1024);
  93. //db.transaction(function(tx){});
  94. }
  95. */
  96. $ionicLoading.hide();
  97. $location.path("/home");
  98. });
  99. });
  100. appTpl.controller("helpController", function($scope){});
  101. appTpl.controller("servicesController", function($scope){});
  102. appTpl.controller("service Controller", function($scope){});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement