@RH34 wrote:
Hi I'm my app works properly at the chrome browser but when I run it in Emulator it does not route even the static page, I use side menu for the page navigations..I am already connected to my API..
//app.js --> My router
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url:"/home",
templateUrl:'templates/home.html',
controller:'HomeCtrl'
}).state('product', {
url:"/product",
templateUrl:'templates/product.html',
controller:'ProductCtrl'
}).state('about', {
url:"/about",
templateUrl:'templates/about.html',
//controller:'AboutCtrl'
}).state('signin', {
url:"/signin",
templateUrl:'templates/signin.html',
controller:'SignCtrl'
}).state('signup', {
url:"/signup",
templateUrl:'templates/signup.html',
controller:'SignCtrl'
}).state('brand', {
url:"/brand",
templateUrl:'templates/brand.html',
controller:'BrandsCtrl'
}).state('privacypolicy', {
url:"/privacypolicy",
templateUrl:'templates/privacypolicy.html',
//controller:'privacypolicyCtrl'})
.state('returnandexchange', {
url:"/returnandexchange",
templateUrl:'templates/returnandexchange.html',
//controller:'returnandexchangeCtrl'
}).state('termsandcondition', {
url:"/termsandcondition",
templateUrl:'templates/termsandcondition.html',
//controller:'termsandconditionCtrl'})
.state('men', {
url:"/men",
templateUrl:'templates/men.html',
controller:'MenCtrl'})
.state('women', {
url:"/women",
templateUrl:'templates/women.html',
controller:'ProductCtrl'})
.state('bag', {
url:"/bag",
templateUrl:'templates/bag.html',
controller:'ProductCtrl'})
.state('clothing', {
url:"/clothing",
templateUrl:'templates/clothing.html',
controller:'ProductCtrl'})
.state('eyewear', {
url:"/eyewear",
templateUrl:'templates/eyewear.html',
controller:'ProductCtrl'})
.state('settings', {
url:"/settings",
templateUrl:'templates/settings.html',
//controller:'SettingsCtrl'})
.state('productpage', {
url:"/productpage",
templateUrl:'templates/productpage.html',
controller:'ProductsCtrl'
}).state('profile', {
url:"/profile",
templateUrl:'templates/profile.html',
//controller:'ProfileCtrl'
}).state('profileedit', {
url:"/profileedit",
templateUrl:'templates/profileedit.html',
//controller:'ProfileCtrl'
}).state('cart', {
url:"/cart",
templateUrl:'templates/cart.html',
controller:'SignCtrl'
})
// patjunio.state('login', {
url:"/login",
templateUrl:'templates/login.html',
controller:'SignCtrl'
}).state('patpost', {
url:"/patpost",
templateUrl:'templates/patpost.html',
controller:'RheaCtrl'
})
.state('patget', {
url:"/patget",
templateUrl:'templates/patget.html',
controller:'JunioCtrl'
}).state('productDetails', {
url: "/productpage/:id",
templateUrl: 'templates/productpage.html',
controller: 'ProductsCtrl'
});//app.js --> One of my controller
.controller('HomeCtrl', ['$scope', '$ionicSideMenuDelegate', '$http', 'ApiEndpoint', '$ionicTabsDelegate', '$ionicSlideBoxDelegate', 'AuthService', function($scope, $ionicSideMenuDelegate, $http, ApiEndpoint, $ionicTabsDelegate, $ionicSlideBoxDelegate, AuthService){
// session.then( function() {$scope.toggleLeft = function() { $ionicSideMenuDelegate.toggleLeft() } $scope.featuredMen = []; $scope.featuredWomen = []; console.log(ApiEndpoint) $http.get(ApiEndpoint.url + '/brands', {}) .success(function(data){ //save user data token console.log(data); angular.forEach(data.brands, function(value, key){ if (value.featured_image_url_men!=null) { $scope.featuredMen.push(value); } if(value.featured_image_url_women!=null){ $scope.featuredWomen.push(value); } }); $ionicSlideBoxDelegate.update(); }) .error(function(data){ //Add error log here for iphone console.log('error'); }) console.log('controller-home')
}])
//home.html --> this should route when I click home in my side menu
EMPORIA
<ion-slide-box delegate-handle="image-viewer" on-slide-changed="slideChanged(index)" does-continue="true" show-pager="false"> <ion-slide ng-repeat="men in featuredMen"> <div class="item item-image"> <a href="/#/product"> <img ng-src="{{men.featured_image_url_men}}" style="height:auto"> <font style="position:absolute; top:150px; left:100px; width:200px; height:25px background-color:black; color:white"> {{men.name}} </font> </a> </div> </ion-slide> </ion-slide-box> <center><b><p style="font-size: 20px; background-color:black; color:white">MEN</p></b></center> <ion-slide-box delegate-handle="image-viewer" on-slide-changed="slideChanged(index)" does-continue="true" show-pager="false"> <ion-slide ng-repeat="women in featuredWomen"> <div class="item item-image"> <a href="/#/product"> <img ng-src="{{women.featured_image_url_women}}" style="height:auto"> <font style="position:absolute; top:150px; left:100px; width:200px; height:25px background-color:black; color:white"> {{women.name}} </font> </a> </div> </ion-slide> </ion-slide-box> <center><b><p style="font-size: 20px; background-color:black; color:white">WOMEN</p></b></center>
//index.html --> Here is my index where I put my side menu, if needed
EMPORIA
<ion-side-menu scroll="false" style="color:#4d4d4d" side="left"> <ion-content> <center> <a menu-close class="item item-list" ng-href="/#/profile" style="background-color:#2574A9"> <img src="img/img_profile.png"> <p style="color:#FAFAFA"><b>Pat Rhealynda Junio</b></p> </a> </center> <a menu-close class="item" ng-href="/#/home"> <font face="emporia" size="6">a</font> Home </a> <a menu-close class="item" ng-href="/#/brand"> <font face="emporia" size="6">b</font> Brands </a> <a menu-close class="item" ng-href="/#/men"> <font face="emporia" size="6">c</font> Men </a> <a menu-close class="item" ng-href="/#/women"> <font face="emporia" size="6">d</font> Women </a> <a menu-close class="item" ng-href="login.html"> <font face="emporia" size="6">e</font> Accessories </a> <a menu-close class="item" ng-href="#/bag"> <font face="emporia" size="6">f</font> Bag </a> <a menu-close class="item" ng-href="/#/clothing"> <font face="emporia" size="6">g</font> Clothing </a> <a menu-close class="item" ng-href="/#/eyewear"> <font face="emporia" size="6">h</font> Eyewear </a> <a menu-close class="item" ng-href="index.html"> <font face="emporia" size="6">i</font> Footwear </a> <div class="item item-divider"> </div> <a menu-close href="/#/settings"> <button style="color:#4d4d4d" class="button button-clear button-dark"> Settings </button></br> </a> <a menu-close href="/#/about"> <button style="color:#4d4d4d" class="button button-clear button-dark"> About </button></br> </a> <a menu-close href="/#/privacypolicy"> <button style="color:#4d4d4d" class="button button-clear button-dark"> Privacy Policy </button></br> </a> <a menu-close href="/#/returnandexchange"> <button style="color:#4d4d4d" class="button button-clear button-dark"> Return & Exchange </button></br> </a> <a menu-close href="/#/termsandcondition"> <button style="color:#4d4d4d" class="button button-clear button-dark"> Terms & Condition </button></br> </a> <div class="item item-divider"> </div> <ul class="list"> <li class="item"><b style="color:#4d4d4d">Contact Us</b></br> <font style="color:#4d4d4d">Email: Info@emporia.ph</font></br> <font style="color:#4d4d4d">Phone: (02) 434 - 86 - 81</font></br></br> </li> <div class="button-bar"> <a menu-close style="color:#FAFAFA; background-color:#1e1e1e" class="button button-clear" href="/#/signin">Sign In</a> </div> </ul> </ion-content> </div> </ion-side-menu> </ion-side-menus> </body>
..Please help me guys..thank you thank you thank you..
Posts: 1
Participants: 1