Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I would like to call f2 after f1 has been completed. f1 function can be synchronous or asynchronous. I need an example that work in both cases. I have found a solution, using a Promise and a timer: global() { this.f1().then(res => { ...

  • 0

I’m setting a timeout to hide an element after a while in Angular 5: this.showElement = true; setTimeout(function () { console.log('hide'); this.showElement = false; }, 2000); However, this doesn’t update the view. The console.log gives me an output, so the timeout definitely works. I have ...

  • 0

I’m trying to get the results from a mock backend in Angular 2 for unit testing. Currently, we are using fakeAsync with a timeout to simulate the passing of time. current working unit test it('timeout (fakeAsync/tick)', fakeAsync(() => { counter.getTimeout(); ...

  • 0

I have service which returns an observable which does an http request to my server and gets the data. I want to use this data but I always end up getting undefined. What’s the problem? Service: @Injectable() export class EventService {constructor(private http: ...

  • 0

I have service which returns an observable which does an http request to my server and gets the data. I want to use this data but I always end up getting undefined. What’s the problem? Service: @Injectable() export class EventService {constructor(private http: ...

close