When a directive returns noChange any nested directive value it might otherwise return should be unchanged. Currently, the resolveDirective helper does not handle noChange and treats this as a value that should clear the nested directive. The nested directive gets removed and then re-created if it is subsequently returned. This prevents, for example, the guard directive from being able to guard a nested directive from running.
To address this, resolveDirective can special case noChange to bail early and simply not process any nested directives.
When a directive returns
noChangeany nested directive value it might otherwise return should be unchanged. Currently, theresolveDirectivehelper does not handlenoChangeand treats this as a value that should clear the nested directive. The nested directive gets removed and then re-created if it is subsequently returned. This prevents, for example, theguarddirective from being able to guard a nested directive from running.To address this,
resolveDirectivecan special casenoChangeto bail early and simply not process any nested directives.