Embarking on a fresh project with Angular 2 and TypeScript, I kicked things off by using the command:
ng new myProject
Next, I integrated web3 (for Ethereum) into the project through:
npm install web3
To ensure proper integration, I included the following in the head of index.html:
<script src="node_modules/web3/dist/web3.min.js"></script>
The path appeared to be correct as there were no errors (changing even one character triggered an error). Despite referring to the documentation at https://www.npmjs.com/package/web3, which suggested utilizing the web3 object directly from the global namespace like so: console.log(web3); I encountered an issue - web3 was not defined. How can I access this object? Please note that in the background, I initiated geth --testnet.