javascript - page redirection now working in angular js -


we new angular js.we developing ng-cordova apps. facing problems page redirection. have 2 homesecond,detailspage pages.in homesecond have loadfeeds method using method data form server when page load.

$scope.loadfeeds = function () {             alert("start");             $http({                   method : "get",                   url : 'http://192.168.3.118:2244/api/postpets/getdata'                   }).then(function mysucces(response) {                          var dogspostlists = response.data;                       $scope.dogspostlists = dogspostlists;                            }, function myerror(response) {                           alert(response);                           //console.log('err'+response.message);                           });             }             $scope.loadfeeds(); 

we have button redrieciton detailspage code

$scope.toggleimage = function (index) {     $location.path("/page11");     } 

after move page11(detailspage).now have button in detailspage.we tried this

$scope.homepagemove = function (){       $location.path("/page4/page9");//homesecond page         } 

when click on button.it's move homesecond page loadfeeds not calling.

routes.js   .state('home', {                url: '/page4',                templateurl: 'templates/home.html',                controller: 'homectrl'                })      .state('home.homesecond', {                url: '/page9',                views: {                'side-menu21': {                templateurl: 'templates/homesecond.html',                controller: 'homesecondctrl'                }                }                })     .state('selectdogdetailspage', {                url: '/page11',                templateurl: 'templates/selectdogdetailspage.html',                controller: 'selectdogdetailspagectrl'                }) 

please tell me wrong in code.

not sure why calling, "/page4/page9".

shouldn't be,

$scope.homepagemove = function (){       $location.path("/page9");//homesecond page } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -