let aa = this._formBuilder.control("");
let bb = this._formBuilder.group({
aa: aa
};
I am trying to achieve the following:
if (typeof(aa) == "Control") {
// perform a specific action
} else if (typeof(aa) == "ControlGroup") {
// perform another specific action
}
Currently, both typeof(aa)
and typeof(bb)
are returning object.
console.log(typeof(aa)); // object
console.log(typeof(bb)); // object
Is there a way to determine whether it is Control or ControlGroup? Thank you