refactor: collapse child registration and child unregistration into a single invocation in the post-link of directives.