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="lib/dist/ng-cordova.min.js"></script>
- <script src="cordova.js"></script>
- <!-- your app's js -->
- <script src="js/app.js"></script>
- </head>
- <body ng-app="starter">
- <ion-pane>
- <ion-nav-view></ion-nav-view>
- </ion-pane>
- </body>
- </html>
- -->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'
- var appTpl = angular.module('starter', ['ionic']);
- appTpl.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();
- }
- });
- });
- appTpl.config(function($stateProvider, $urlRouterProvider) {
- $stateProvider
- .state("home", {
- url: "/home",
- templateUrl: "template/home.html",
- controller: "homeController",
- })
- .state("help", {
- url: "/help",
- templateUrl: "template/help.html",
- controller: "helpController",
- })
- .state("service", {
- url: "/services",
- templateUrl: "template/services.html",
- controller: "servicesController",
- })
- .state("service", {
- url: "/services/:idservice",
- templateUrl: "template/service.html",
- controller: "serviceController",
- });
- });
- appTpl.controller("homeController", function($scope, $ionicLoading){
- $ionicPlatform.ready(function(){
- $ionicLoading.show({template: "Loading..."});
- /*
- if (window.cordova){
- //istanzio il db con dbcopy o altro
- }else{
- //istanzio con localstorage
- //db = openDatabase("websql.db", "1.0","My Local WebSQL DB", 2 * 1024 * 1024);
- //db.transaction(function(tx){});
- }
- */
- $ionicLoading.hide();
- $location.path("/home");
- });
- });
- appTpl.controller("helpController", function($scope){});
- appTpl.controller("servicesController", function($scope){});
- appTpl.controller("service Controller", function($scope){});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement