my web3 version is version: '1.0.0-beta.20',I am loading the web3 using the angular 4.
import * as Web3 from 'web3';
this.web3 = new Web3(window.web3.currentProvider);
console.log(this.web3);
this.web3.utils.toWei(value_eth+"", 'ether');
the code gives me an error saying: web3.utils.toWei read property 'toWei' of undefined
printing out web3 shows that web3 has no utils as shown in the picture below, it is very strange.

Hi,
You should try window.web3.toWei(1, 'ether')
You said that you are using version '1.0.0-beta.20', but your output is showing that web3 is using api version 0.20.3. Make sure that the correct version of web3 has been installed.
Most helpful comment
Hi,
You should try
window.web3.toWei(1, 'ether')