Created
July 8, 2018 20:09
-
-
Save arutnik/3dd73db67ad693bc37966972aaf0f914 to your computer and use it in GitHub Desktop.
SEO-SPA: Browser DI Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ElementFocusService } from './element-focus.service'; | |
import { Injectable, ElementRef } from '@angular/core'; | |
@Injectable() | |
export class ElementFocusBrowserService extends ElementFocusService { | |
constructor() { | |
super(); | |
} | |
public focusElement(element: ElementRef) { | |
element.nativeElement.focus(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment