refactor(render): cleanup access to native dom elements
BREAKING CHANGES: - rename `ElementRef.domElement` to `ElementRef.nativeElement` - add `Renderer.getNativeElementSync` to make the app side less dependent on the dom renderer. - don’t use `ElementRef.nativeElement` in directives but use the methods on `Renderer` directly. - Removed `ElementRef.setAttribute`. Use `Renderer.setElementAttribute` instead. Closes #2712 Last part of #2476 Closes #2476
This commit is contained in:
@@ -24,7 +24,7 @@ export class Ruler {
|
||||
constructor(domAdapter: DomAdapter) { this.domAdapter = domAdapter; }
|
||||
|
||||
measure(el: ElementRef): Promise<Rectangle> {
|
||||
var clntRect = <any>this.domAdapter.getBoundingClientRect(el.domElement);
|
||||
var clntRect = <any>this.domAdapter.getBoundingClientRect(el.nativeElement);
|
||||
|
||||
// even if getBoundingClientRect is synchronous we use async API in preparation for further
|
||||
// changes
|
||||
|
||||
Reference in New Issue
Block a user