public/javascripts/site/app.js


 

angular.module('Spotdekhoapp.services', [])
  .factory('spotdekhoAPIservice', function($http) {

    var spotdekhoAPI = {};
    //spotdekhoAPI.loc = locationProvider;
    spotdekhoAPI.getWelcomePage = function(city){
        return $http({
            url: '/admin/welcome-page/'+city
        });
    }
    spotdekhoAPI.getWelcomePageByType = function (uri) {
      return $http({
        url: '/admin/welcome-page' + uri
      });
    }
    spotdekhoAPI.getOffers = function(id) {
      return $http({
        url: '/admin/offers/detail/'+id
      });
    }
    spotdekhoAPI.getsubList = function(id) {
      return $http({
        url: '/admin/subList/detail/'+id
      });
    }
    spotdekhoAPI.getVenues = function(city) {
      return $http({
        url: '/admin/venue/list/'+city
      });
    }
    spotdekhoAPI.getVenueDetail = function(id) {
      return $http({
        url: '/admin/venue/detail/'+id
      });
    }

    spotdekhoAPI.postComment = function(id, comment, curdate){
      return $http.post('/admin/postcomment/'+id, {'comment': comment, 'curdate': curdate});
    }

    spotdekhoAPI.postRating = function(id, rating) {
      return $http.post('/admin/postrating/'+id, {'rating': rating});
    }

    return spotdekhoAPI;
  });

var Spotdekhoapp = angular.module('Spotdekhoapp', [
  'ngRoute',
  'Spotdekhoapp.controllers',
  'Spotdekhoapp.services'
]).
config(['$routeProvider', '$locationProvider',function($routeProvider, $locationProvider) {

     $locationProvider.html5Mode(true);
  $routeProvider.
    when("/login", {templateUrl: "partials/account/login.jade"}).
    when("/forgot", {templateUrl: "partials/account/forgot.jade"}).
    when("/signup", {templateUrl: "partials/account/signup.jade"}).
    when("/account", {templateUrl: "partials/account/profile.jade"}).
    when("/account/profile", {templateUrl: "partials/account/profile.jade"}).
    when("/account/password", {templateUrl: "partials/account/profile.jade"}).
    when("/account/delete", {templateUrl: "partials/account/profile.jade"}).
    when("/advertise-hotel-cab-restaurant-travel-packages", {templateUrl: "partials/advertise.jade"}).
    when("/Advertise-hotels", {templateUrl: "partials/adhotels.jade"}).
    when("/Advertise-restaurant", {templateUrl: "partials/adrestra.jade"}).
    when("/Advertise-cab-taxi", {templateUrl: "partials/adcab.jade"}).
    when("/Advertise-tour-travel-packages", {templateUrl: "partials/adtravel.jade"}).
    when("/add-tourist-spots", {templateUrl: "partials/addspots.jade"}).
    when("/RegionWise", {templateUrl: "partials/RegionWise.jade"}).
    when("/listIndia", {templateUrl: "partials/listIndia.jade"}).
    when("/contactus", {templateUrl: "partials/contactus.jade"}).
    when("/aboutus", {templateUrl: "partials/aboutus.jade"}).
    when("/termsofser", {templateUrl: "partials/termsofser.jade"}).
    when("/privacypolicy", {templateUrl: "partials/privacypolicy.jade"}).
    when("/:city", {templateUrl: "partials/touristSpots.jade"  ,  controller: "wPController"}).
    when("/:city/type/tourist", {templateUrl: "partials/touristSpots.jade"  ,  controller: "typeController"}).
    when("/:city/type/:type", {templateUrl: "partials/backgrnd.jade"  ,  controller: "typeController"}).
    when("/venues/:id", {templateUrl: "partials/venue.jade", controller: "venueController"}).
    when("/offers/:id", {templateUrl: "partials/offers.jade", controller: "offersController"}).
    when("/subList/:id", {templateUrl: "partials/subList.jade", controller: "subListController"}).
    otherwise({redirectTo: '/'});
}]);

 

Leave a Reply

Your email address will not be published. Required fields are marked *