我有这段代码:
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());