You should use html autofocus for this:
<input *ngIf="show" #search type="text" autofocus />
Note: if your component is persisted and reused it will only autofocus the first time the fragment is attached. This can be overcome by having a global dom listener that checks for autofocus attribute inside a dom fragment when it is attached and then reapplying it or focus via javascript.