fixed the App.routeAlias replaced by a service
This commit is contained in:
parent
765f9c12cc
commit
d7e99cb250
@ -6,7 +6,6 @@ NGApp.factory( 'CommunityAliasService', function( PositionsService ){
|
||||
service.position = PositionsService;
|
||||
|
||||
service.route = function( id, success, error ){
|
||||
|
||||
id = id.replace('/','').toLowerCase();
|
||||
alias = App.aliases[id] || false;
|
||||
success = success || function(){};
|
||||
|
||||
@ -28,7 +28,7 @@ NGApp.factory('PositionsService', function () {
|
||||
});
|
||||
|
||||
// LocationServiceservice
|
||||
NGApp.factory('LocationService', function ($location, RestaurantsService, PositionsService, AccountService) {
|
||||
NGApp.factory('LocationService', function ($location, RestaurantsService, PositionsService, AccountService, CommunityAliasService) {
|
||||
|
||||
var service = {
|
||||
form: {
|
||||
@ -42,6 +42,8 @@ NGApp.factory('LocationService', function ($location, RestaurantsService, Positi
|
||||
_initied : false
|
||||
}
|
||||
|
||||
var community = CommunityAliasService;
|
||||
|
||||
service.account = AccountService;
|
||||
service.position = PositionsService;
|
||||
service.restaurantsService = RestaurantsService;
|
||||
@ -350,8 +352,7 @@ NGApp.factory('LocationService', function ($location, RestaurantsService, Positi
|
||||
}
|
||||
});
|
||||
};
|
||||
// TODO: use the service
|
||||
App.routeAlias(address, rsuccess, rerror);
|
||||
community.route(address, rsuccess, rerror);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user