无法重定向到网址

时间:2017-12-28 14:14:03

标签: angularjs

我有这段代码:

public FieldInfo GetPrivateFieldRecursive(Type type, string fieldName)
{
    FieldInfo field = null;

    do
    {
        field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Public 
            | BindingFlags.NonPublic | BindingFlags.GetField);
        type = type.BaseType;

    } while(field == null && type != null);

    return field;
}

当我加载页面站点/#/ user将重定向到startUrl,但是如果没有#user用户的加载站点将不会被重新发送,但app.run(function($rootScope, $location, userModel){ $rootScope.$on("$routeChangeStart", function(event, next, current){ if ($location.path() == '/' && userModel.getAuthStatus()) { console.log(userModel.getStartUrl()); $location.path(userModel.getStartUrl()); }; 将被执行

console.log(userModel.getStartUrl());

0 个答案:

没有答案