fix(uiView): Properly handle uiView within a ngIf

Use the linking function element instead of the template element.

Closes #857