I have 3 elements on my screen.
1. oj-input-text
2. oj-text-area
3. oj-button
I want to enable the button only when both inputText and textArea have some value not otherwise.
One way to do is, i subscribe to the observable corresponding to both these fields.
inputText.subscribe () {
//check if inputText and textArea both have value, then enable button
}
textArea.subscribe () {
//check if inputText and textArea both have value, then enable button
}
But for this to work, i should loose focus from that element, only then the subscribe works.
Is there any other elegant way to do this? Where in, as soon as i type into the text-box/area without loosing focus, i should be able to have a check?