Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///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">
- <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
- <link href="css/ionic.app.css" rel="stylesheet">
- -->
- <!-- ionic/angularjs js -->
- <script src="lib/ionic/js/ionic.bundle.js"></script>
- <!-- cordova script (this will be a 404 during development) -->
- <script src="cordova.js"></script>
- <!-- your app's js -->
- <script src="js/app.js"></script>
- <script src="js/controllers/news.js"></script>
- <!--<script src="js/services/services.js"></script>-->
- </head>
- <body ng-app="starter" ng-controller="TodoCtrl">
- <ion-pane>
- <ion-header-bar class="bar-stable">
- <h1 class="title">Proves</h1>
- <div class="buttons">
- <button class="btnMap" ui-sref="page_map" >Map</button>
- </div>
- </ion-header-bar>
- <ion-content>
- <!-- our list and list items -->
- <ion-list>
- <ion-item ng-repeat="task in news">
- {{task.alias}}
- </ion-item>
- </ion-list>
- </ion-content>
- </ion-pane>
- </body>
- </html>
- //js/app.js
- // Ionic Starter App
- // angular.module is a global place for creating, registering and retrieving Angular modules
- // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
- // the 2nd parameter is an array of 'requires'
- angular.module('starter', ['ionic'])
- .run(function($ionicPlatform) {
- $ionicPlatform.ready(function() {
- // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
- // for form inputs)
- if(window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
- }
- if(window.StatusBar) {
- StatusBar.styleDefault();
- }
- });
- })
- // Configuring routes
- .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
- $urlRouterProvider.otherwise('/');
- $stateProvider.state('page_map', {
- url: '/map',
- templateUrl: 'templates/map/map.html'
- })
- }]);
- //templates/map/map.html
- <ion-pane>
- <ion-header-bar class="bar-stable">
- <h1 class="title">Hola</h1>
- </ion-header-bar>
- <ion-content>
- <!-- our list and list items -->
- </ion-content>
- </ion-pane>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement