Angular passing a value from child component to disable button in parent component

Advertisements I’m having trouble understanding how to use the @Output and EventEmitter to pass a boolean value from the child component to the button in the parrent element to disable or enable it. More specifically, I want that when the container with text is scrolled at the bottom (which is the child component) to pass… Read More Angular passing a value from child component to disable button in parent component

Disable submit button if input field is blank or user enter empty spaces

Advertisements I want to disable my submit button if the user enters empty spaces in the input field. I don’t want an empty input field with just spaces showing submit button enabled. $(“#edit-title-input”).on(“keyup”, stateHandle); function stateHandle(e) { // console.log({a:$(“#title”).text(),b:e.target.value}); if ($(“#title”).text() == e.target.value || input.value.length == 0) { $(‘#edit-submit’).prop(‘disabled’, true); } else { $(‘#edit-submit’).prop(‘disabled’, false);… Read More Disable submit button if input field is blank or user enter empty spaces