Initialization logic that relies on bindings being present should be put in the controller's $onInit()
method, which is guaranteed to always be called after the bindings have been assigned. This is the robust way to write your controller. Just because you have been lucky up until now, is no reason to continue using flaky and fragile coding methods.
For more information, see
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…