Angularjs Angular phonegap应用程序导航问题

Angularjs Angular phonegap应用程序导航问题,angularjs,cordova,Angularjs,Cordova,这是一个phonegap+angularjs项目。假设我在这一页上 file:///android_asset/www/index.html#/groupHome" if(window.location.hash.indexOf("/groupHome")>-1) { angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {

这是一个phonegap+angularjs项目。假设我在这一页上

     file:///android_asset/www/index.html#/groupHome"
if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;
现在,我收到一个通知,单击“通知”后,我将更改哈希,如下所示:

window.location.hash= "/groupHome?groupId=xyz";
if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;
如果am位于除<代码>file:///android_asset/www/index.html#/groupHome“导航正确,但如果我在
file:///android_asset/www/index.html#/groupHome“
页面无法导航

$stateProvider
        .state('groupHome', {
            url: "/groupHome",
            templateUrl: "groupHome.html"

        })
if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;
这里是重定向

if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;
使用角度

if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;
要顺利地从一个视图导航到其他视图,请使用角度导航

if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;

为了顺利地从一个视图导航到其他视图

您的问题只出现在phone gap上,还是也出现在普通的web浏览器上?我正在android mobileIn phone gap我们的默认浏览器上进行测试?笔记本电脑呢?这是用phonegap开发的android应用程序,所以我在模拟器上测试,也在android phone上测试。请给我们这个视图的路线定义。你的问题是只出现在phone gap上还是出现在普通的web浏览器上?我在android mobileIn phone gap上测试,这是我们的默认浏览器?笔记本电脑呢?这是用phonegap开发的android应用程序,所以我在模拟器上测试,也在android phone上测试。请给我们这个视图的路线定义。你的问题是只出现在phone gap上还是出现在普通的web浏览器上?我在android mobileIn phone gap上测试,这是我们的默认浏览器?笔记本电脑呢?这是用phonegap开发的android应用程序,所以我正在模拟器和android Phone上进行测试。请给我们这个视图的路线定义。
if(window.location.hash.indexOf("/groupHome")>-1)
{

   angular.element("[ng-controller =groupHomeController]").injector().invoke(['$state',function($state) {
                        $state.reload("/groupHome?groupId="+msg.extraParam.groupId);
                    }]);

            }
            else
                window.location.hash="/"+msg.extraParam._nextPage+"?groupId="+msg.extraParam.groupId;