top of page

Profile

Join date: May 18, 2022

About

But when I tried the following code the subscribe method is not working. I have tried with rxjs 5 and rxjs 6 Code : const app =



 

Agarest.Generations.of.War.DLC.Unlocker-BAT Fitgirl Repack


Download


 





Category:Video game hackingQ: Angular 2 observable not returning value on subscribe method I am trying to convert my Angular 1 code to 2 version. But when I tried the following code the subscribe method is not working. I have tried with rxjs 5 and rxjs 6 Code : const app = this.angular.module('app', []) app.controller('appController', [ '$http', '$scope', '$firebase', '$location', '$window', '$rootScope', '$mdToast', 'UserService', ($http, $scope, $firebase, $location, $window, $rootScope, $mdToast, UserService) => { var aa = UserService.getData() .then((data) => { $scope.aa = data console.log(data) return data }) .catch((err) => { console.log(err) $scope.aa = [] }) .finally((data) => { console.log(data) }) } ]) app.service('UserService', ['$firebase', '$http', ($firebase, $http) => { this.getData = () => { var response = '' $firebase(firebaseConfig).limitToLast(30).orderByKey().on('value', (snapshot) => { response = snapshot.val() }) return response } } ]) A: The problem is that the promise aa is in a.catch block, and.then() is not called so aa is an empty array. You should call.then() so that the aa array has the data that comes out of the promise chain, like this: app.controller('appController', ['$http', '$




ee43de4aa9

Agarest.Generations.of.War.DLC.Unlocker-BAT Fitgirl Repack

More actions
bottom of page