Can anyone advise on the proper method to initialize a variable with factory data in Angular? The current approach I'm using doesn't seem right to me. Am I doing it wrong?
$scope.result = [];
factoryCities.then(function(data){
$scope.result = data;
});