fixed the App.routeAlias replaced by a service

This commit is contained in:
Daniel Camargo 2013-08-10 15:40:51 -03:00
parent 765f9c12cc
commit d7e99cb250
2 changed files with 4 additions and 4 deletions

View File

@ -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(){};

View File

@ -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);
}