我可以在刷新地址栏的同时触发$ routeprovider。我想要在编辑地址栏中的url时触发routeprovider(http://localhost/Angular/samples/#/home/grouping).I)想要编辑这个url like(http://localhost/Angular/samples/#/home/split).while刷新我可以触发$ routeProviderReference.but我不能触发而编辑,然后单击地址栏。
$ routeProviderReference.when( “/” + $ rootScope.subRoute.templateUrl,{
templateUrl: $rootScope.subRoute.templateUrl + ".html",
resolve: ["$q", "$rootScope", function ($q, $rootScope) {
var deferred = $q.defer();
require([
$rootScope.subRoute.templateUrl
], function() {
$rootScope.$apply(function() {
deferred.resolve();
});
});
return deferred.promise;
}]
});
};
任何人都可以请建议我
您能否详细说明您的问题,以便它会更清晰 –
我已经详细阐述了这个问题 –