I first installed npm and made sure it was up to date. Then I tried installing angular but I was faced with errors
~ kode$ sudo npm install -g @angular/cli
You need to delete ng folder from /usr/local/bin Install again
sudo rm -rf /usr/local/bin/ng
sudo npm i -g angular/cli