问题
I am getting the error TypeError: Cannot read property 'pCity' of undefined. I am injecting web3 in angular and getting this error for every Web3 function call. This is working fine outside angular. I have imported the web3.js file in angular.json like this:
"styles": [
"src/styles.scss"
],
"scripts": ["https://cdn.jsdelivr.net/npm/web3@1.2.6/dist/web3.min.js"]
}
This is being rejected here however was resolved in a simple js file called from an html file. See the rejected promise error here
来源:https://stackoverflow.com/questions/61373072/uncaught-in-promise-typeerror-cannot-read-property-pcity-of-undefined