You should use the $document service instead of the default document object
9
10repayButton.addEventListener('click', async (e) => {
11 e.preventDefault();
12 const repaymentAmount = document.getElementById('repayment-amount').value;13
14 // Call the smart contract's repayLoan function
15 const web3 = new Web3(
Description
Instead of the default document object, you should prefer the AngularJS wrapper service $document.
Rule based on Angular 1.x
Bad Practice
// invalid
document.title // error: You should use the $document service instead of the default document object
Recommended
// valid
$document[0].title = ""