Skip to main content

Questions tagged [angular2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
626 views

Unable to use "window.ethereum" in Angular

import { Component, OnInit } from '@angular/core'; import { ethers } from 'ethers'; import { MetaMaskInpageProvider } from '@metamask/providers'; @Component({ selector: 'app-connect-wallet', ...
kadircan's user avatar
1 vote
1 answer
216 views

Web3.js with Angular not working

I can't get web3.js to work with Angular. I got the exact same problem as the person here. I used method 2 from the answer on that question, and it seems to work as it now compiles, but I'm getting ...
Bas Bastiaansen's user avatar
2 votes
1 answer
791 views

Issue in Dapp using Angular 11.1.0 and web3 1.3.4 and Rinkeby metamask, getting error on new Web3(window.web3.currentProvider)

I am trying to create DAPP using Angular 11.1.0. I am able to deploy the contract on Rinkeby test network successfully. But on Client side getting below error on loading [email protected] js. Getting error: ...
Gaurav Maheshwari's user avatar
3 votes
1 answer
817 views

Can not call the solidity smart contract function from web3js

I am trying to call a method in solidity smart contract through angular app, but I am getting this error: TypeError: this.contract.methods.hello is not a function at CertificateContractService.<...
Ragulan28's user avatar
  • 133
0 votes
1 answer
615 views

How to use bip39 module in angular?

I am trying to create an ethereum wallet app using Ionic. I have tried to import bip39 node module directly in the angular project but it gives me error. Please help import { Injectable } from '@...
Vinnakota Sai Sujeeth's user avatar
2 votes
1 answer
3k views

Error can't create a new Web3 object on angular

I've tried on ubuntu, windows with different versions and browsers. web3 1 latest beta: WARNING in ./node_modules/asn1.js/lib/asn1/api.js Module not found: Error: Can't resolve 'vm' in 'C:\...
user avatar
2 votes
1 answer
2k views

Transfer ERC20 token using Web3 and angular

I'm trying to make a simple token transfer app using Web3.js and Angular all i want is to transfer some tokens from an address A to an address B. So, I made two functions in an angular service , the ...
Mounir Ilyass's user avatar
4 votes
3 answers
1k views

How Listen to an smart contract event using web3 and angular?

I am using [email protected] inside angular to call smart contract functions, I want to know how to watch a smart contract event in angular? using javascript is easy and it works : sEvent.watch(function(...
maroodb's user avatar
  • 1,121
2 votes
1 answer
7k views

The MetaMask Web3 object does not support synchronous methods like personal_newAccount without a callback parameter

im using web3j with angular 5 connection working perfectly and balance showing perfectly. but when i write transfer function it throw error var tx = this._web3.eth.sendTransaction({ from: this....
Hassan Abbas's user avatar
0 votes
1 answer
352 views

Getting a list of Variables in a smart contract via just the contract address

Is it possible to get a list of all variables that a smart contract needs to be sent just by knowing the contract's address? What i want to do: make a call to the chain and get the required ...
Onitlikesonic's user avatar
3 votes
1 answer
586 views

Creating new account from web3 showing error

while creating new account from angular using web3 personal.newAccount function() undefined import { Injectable } from '@angular/core'; import { User } from './login/user'; const Web3=...
Shubhabrata Mukherjee's user avatar
0 votes
1 answer
1k views

create a new account using web3.js with angular

i am trying to create a new account using web3.js with angular 4. Following is my service ` import { Injectable } from '@angular/core'; import * as Web3 from 'web3'; declare let require: any; ...
Shoaib Iqbal's user avatar
0 votes
1 answer
870 views

How to process sending ether from contract address to an account

Let's say there's a button in html that can claim winnings. <button type="submit" (click)="claimWinnigs()">Claim Winnings</button> A user with account address 0xf17...b732 claimed ...
bbusdriver's user avatar
  • 1,154
1 vote
1 answer
435 views

Constant function returns empty array + web3js

I have a simple solidity script where I tested in remix (injected Web3 using geth local environment) and worked fine returning an array of data from a constant method. pragma solidity ^0.4.11; ...
bbusdriver's user avatar
  • 1,154
3 votes
2 answers
13k views

Getting Metamask account's balance using fromWei

Using web3 javascript code to get selected account's balance in Metamask and show it in html, web3.eth.getCoinbase(function(err, account) { if (err === null) { App.account = account; $("#...
bbusdriver's user avatar
  • 1,154
0 votes
0 answers
503 views

web3 angular not working in IE 11

Have a problem with web3. In the project on angular use this library. In all browsers everything is good but in ie 11 it gives an error and does not load. Error in this line const {keccak256, ...
Andrey Patseiko's user avatar
8 votes
2 answers
6k views

how to hook up web3 injected by metamask in angular 2

As described in metamask github, one can bootstrap metamask like this: window.addEventListener('load', function() { // Checking if Web3 has been injected by the browser (Mist/MetaMask) if (typeof ...
Leean's user avatar
  • 101
3 votes
2 answers
5k views

How can I use web3.js with Angular 2

I'm trying to import Web3 to my component files which is written in Typescript but I couldn't make it. I used npm install --save web3-typescript-typings and added "include": [ "../node_modules/...
vutran's user avatar
  • 802