fix the bug by uisng templateUrl instead of template.