Undefined Function from Provider


I have this code

	loginFB() {
    	this.afAuth.auth.signInWithPopup(new firebase.auth.FacebookAuthProvider()).then(function(result) {
  			// This gives you a Facebook Access Token.
  			var token = result.credential.accessToken;
  			// The signed-in user info.
  			const user = result.user;

calling a function from the below provider code

import { Injectable } from '@angular/core';

  Generated class for the PpProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
export class PpProvider {
	public picURL:string = 'https://image.flaticon.com/icons/png/512/15/15081.png';
	constructor() {
		console.log('Hello PpProvider Provider');

	updatepicURL(url) {
		return console.log(url);

the issue is that it says cannot access pPicture of undefined


You have not pass the parameter in updatepicURL


Oh yeah, typo
Thanks, but that doesn’t solve the problem


Cannot read property ‘pPicture’ of undefined


Anyone help? What am I doing wrong?