I am working on a small Greasemonkey script to speed up some processes in a vendor's tool that is written in angularJS.
The issue I seem to be facing is that the element is not in the DOM when the script runs:
$(document).ready(function() {
var pwEl = $("input:password").val(chance.word({length: 8});
};
fails because the input field does not seem to be present when (document).ready() runs. There have been a few resources that seem to confirm this.
Is there a way that I can wait for Angular to finish before running my script? I have found references to using:
angular.element(document).ready(function() {
console.log("Hi from angular element ready");
});
However, this never seems to execute either.
I'm really new to Angular (I've only played around with a few short tutorials). Any direction is appreciated.
Thank you!