Ruan
Ruan

Reputation: 4293

Ionic 4 Console.Log() not showing in function

What on Earth is happening here. No console output inside this service function of mine. Any one had this issue before?

   test(){
    console.log('TESTING???')
    console.log('TESTING???')
    return 'HALOOOOOOO??'
  }

Calling the function

console.log('Before Test')
console.log(this.emergencyService.test())
console.log('After Test')

Output

enter image description here

Some more info.

Upvotes: 2

Views: 1077

Answers (2)

Ruan
Ruan

Reputation: 4293

I had a filter on my console.

Clearing it solved my problem.

enter image description here

Upvotes: 1

jcmendes98
jcmendes98

Reputation: 148

It's returning the value of the method. If instead of console.log(this.emergencyService.test()) you add this.emergencyService.test(), what does it show? It returns the two console.log(), no?

Upvotes: 1

Related Questions