Handle `template` and `templateUrl` consistently