Saturday, 28 September 2013

Navigates of page programmatically but address bar URL doesn't changes

Navigates of page programmatically but address bar URL doesn't changes

I am using J-Query Mobile and AngularJS and on the pressing link i want
navigate user to different page it navigates but url address in address
bar doesn't change how to solve this issue. I ma using the single page
structure
HTML Part
<a href="" ng-controller="addFoodToLog" ng-click="go()"
data-role="button">Add To Log</a>
JS Part
var myApp = angular.module('myApp',[]);
myApp.controller('addFoodToLog',function($scope){
$scope.go = function() {
//Here Selected Food Bump In Food Log
alert("Successfully Add In Your Log");
$.mobile.changePage('index.html#foodscreen');
}
});

No comments:

Post a Comment