app.js 2.86 KB
angular.module('myApp.services', ['LocalStorageModule']);
angular.module('myApp.directives', []);
var app  = angular.module('myApp', [ "ui.router",'myApp.services', 'myApp.directives']);

    app.config(['$stateProvider' , '$urlRouterProvider' , function($stateProvider, $urlRouterProvider){
        $urlRouterProvider.otherwise("/main");
            $stateProvider.state('main', {
                url: "/main",
                templateUrl: "html/main.html"
            })
            .state('login',{
                url: "/login",
                templateUrl: "html/login.html"
            })
            .state('trip',{
                url: "/trip",
                templateUrl: "html/trip.html",
                controller: 'tripController'
            })
            .state('wallet',{
                url: "/wallet",
                templateUrl: "html/wallet.html"
            })
            .state('bond',{
                url: "/bond/?longitude&latitude",
                templateUrl: "html/bond.html"
            })
            .state('contact',{
                url: "/contact",
                templateUrl: "html/contact.html"
            })
            .state('opinion',{
                url: "/opinion/?longitude&latitude",
                templateUrl: "html/opinion.html"
            })
            .state('tripDetail',{
                url: "/tripDetail/:orderId",
                templateUrl: "html/tripDetail.html" ,
                controller: 'tripDetailController'
            })

            .state('prepay',{
                url: "/prepay",
                templateUrl: "html/prepay.html"
            })
            .state('pay',{
                url: "/pay",
                templateUrl: "html/pay.html"
            })
            .state('bondPay',{
                url: "/bondPay",
                templateUrl: "html/bondPay.html"
            })
            .state('bondSuccess',{
                url: "/bondSuccess",
                templateUrl: "html/bondSuccess.html"
            })
            .state('rentDetail',{
                url: "/rentDetail",
                templateUrl: "html/rentDetail.html"
            })
            .state('unusual',{
                url: "/unusual/:id",
                templateUrl: "html/unusual.html"
            })
            .state('rechargeList',{
                url: "/rechargeList",
                templateUrl: "html/rechargeList.html"
            })
            .state('wxPayReturn',{
                url: "/wxPayReturn/:type",
                templateUrl: "html/wxPayReturn.html",
                controller: 'wxPayReturnController'
            })



    }])
app.run(['globalService', function(globalService) {
	globalService.init();
	var loading = document.getElementById("appLoadingIndicator");
	loading.style.display = "none";
}])
//$(window).bind("load resize",function(){
//  $("body").css({zoom:$(window).width()/320,visibility:"visible"});
//});