Advertisement
Guest User

ionic_chaos

a guest
Aug 28th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. ///index.html
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
  7. <title></title>
  8.  
  9. <link href="lib/ionic/css/ionic.css" rel="stylesheet">
  10. <link href="css/style.css" rel="stylesheet">
  11.  
  12. <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
  13. <link href="css/ionic.app.css" rel="stylesheet">
  14. -->
  15.  
  16. <!-- ionic/angularjs js -->
  17. <script src="lib/ionic/js/ionic.bundle.js"></script>
  18.  
  19. <!-- cordova script (this will be a 404 during development) -->
  20. <script src="cordova.js"></script>
  21.  
  22. <!-- your app's js -->
  23. <script src="js/app.js"></script>
  24. <script src="js/controllers/news.js"></script>
  25. <!--<script src="js/services/services.js"></script>-->
  26. </head>
  27. <body ng-app="starter" ng-controller="TodoCtrl">
  28.  
  29. <ion-pane>
  30. <ion-header-bar class="bar-stable">
  31. <h1 class="title">Proves</h1>
  32. <div class="buttons">
  33. <button class="btnMap" ui-sref="page_map" >Map</button>
  34. </div>
  35. </ion-header-bar>
  36. <ion-content>
  37. <!-- our list and list items -->
  38. <ion-list>
  39. <ion-item ng-repeat="task in news">
  40. {{task.alias}}
  41. </ion-item>
  42. </ion-list>
  43. </ion-content>
  44. </ion-pane>
  45. </body>
  46. </html>
  47.  
  48.  
  49. //js/app.js
  50. // Ionic Starter App
  51.  
  52. // angular.module is a global place for creating, registering and retrieving Angular modules
  53. // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
  54. // the 2nd parameter is an array of 'requires'
  55. angular.module('starter', ['ionic'])
  56.  
  57. .run(function($ionicPlatform) {
  58. $ionicPlatform.ready(function() {
  59. // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
  60. // for form inputs)
  61. if(window.cordova && window.cordova.plugins.Keyboard) {
  62. cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  63. }
  64. if(window.StatusBar) {
  65. StatusBar.styleDefault();
  66. }
  67. });
  68. })
  69.  
  70. // Configuring routes
  71. .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
  72.  
  73. $urlRouterProvider.otherwise('/');
  74. $stateProvider.state('page_map', {
  75. url: '/map',
  76. templateUrl: 'templates/map/map.html'
  77. })
  78.  
  79.  
  80. }]);
  81.  
  82. //templates/map/map.html
  83.  
  84. <ion-pane>
  85. <ion-header-bar class="bar-stable">
  86. <h1 class="title">Hola</h1>
  87.  
  88. </ion-header-bar>
  89. <ion-content>
  90. <!-- our list and list items -->
  91.  
  92. </ion-content>
  93. </ion-pane>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement