Skip to content

Commit 7894b19

Browse files
author
VladimirAmiorkov
committed
chore: remove 'read' from ViewChild calls
1 parent b9b9bbc commit 7894b19

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

Diff for: e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { ModalViewComponent } from "~/modal-shared/modal-view.component";
2323

2424
export class BasicsNavigationComponent {
2525

26-
@ViewChild("popoverButtonComp", { read: ElementRef, static: false }) popoverButtonComp: ElementRef;
26+
@ViewChild("popoverButtonComp", { static: false }) popoverButtonComp: ElementRef;
2727
@Input() col: number;
2828
constructor(
2929
private modal: ModalDialogService,

Diff for: e2e/nested-router-tab-view/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { NSLocationStrategy } from "nativescript-angular/router/ns-location-stra
1212
export class AppComponent {
1313
private isInitialNavigation = true;
1414

15-
@ViewChild(TabViewDirective, { read: TabViewDirective, static: false }) tabView: TabViewDirective;
15+
@ViewChild(TabViewDirective, { static: false }) tabView: TabViewDirective;
1616

1717
constructor(router: Router, location: NSLocationStrategy) {
1818
router.events.subscribe(e => {

Diff for: e2e/router-tab-view/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { NSLocationStrategy } from "nativescript-angular/router/ns-location-stra
1212
export class AppComponent {
1313
private isInitialNavigation = true;
1414

15-
@ViewChild(TabViewDirective, { read: TabViewDirective, static: false }) tabView: TabViewDirective;
15+
@ViewChild(TabViewDirective, { static: false }) tabView: TabViewDirective;
1616

1717
constructor(router: Router, location: NSLocationStrategy) {
1818
router.events.subscribe(e => {

Diff for: tests/app/tests/detached-loader-tests.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestComponent { }
1010

1111

1212
class LoaderComponentBase {
13-
@ViewChild(DetachedLoader, { read: DetachedLoader, static: false }) public loader: DetachedLoader;
13+
@ViewChild(DetachedLoader, { static: false }) public loader: DetachedLoader;
1414
}
1515

1616
@Component({

Diff for: tests/app/tests/list-view-tests.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class TestDefaultItemTemplateComponent {
9393
this.myItems.push(new DataItem(i, "Name " + i));
9494
}
9595
}
96-
@ViewChild("listView", { read: ListViewComponent, static: false }) listViewElement: ListViewComponent;
96+
@ViewChild("listView", { static: false }) listViewElement: ListViewComponent;
9797
onScrollListViewTo() {
9898
this.listViewElement.nativeElement.scrollToIndex(100);
9999
}

Diff for: tests/app/tests/renderer-tests.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ registerElement("ButtonCounter", () => ButtonCounter);
222222
}`]
223223
})
224224
export class NgControlSettersCount {
225-
@ViewChild("btn1", { read: ElementRef, static: false }) btn1: ElementRef;
226-
@ViewChild("btn2", { read: ElementRef, static: false }) btn2: ElementRef;
227-
@ViewChild("btn3", { read: ElementRef, static: false }) btn3: ElementRef;
228-
@ViewChild("btn3", { read: ElementRef, static: false }) btn4: ElementRef;
225+
@ViewChild("btn1", { static: false }) btn1: ElementRef;
226+
@ViewChild("btn2", { static: false }) btn2: ElementRef;
227+
@ViewChild("btn3", { static: false }) btn3: ElementRef;
228+
@ViewChild("btn3", { static: false }) btn4: ElementRef;
229229

230230
get buttons(): ElementRef[] { return [this.btn1, this.btn2, this.btn3, this.btn4]; }
231231

Diff for: tests/app/tests/router-module-tests.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import { NSRouteReuseStrategy } from "nativescript-angular/router/ns-route-reuse
1313
template: `<StackLayout><Label nsRouterLink text="COMPONENT"></Label></StackLayout>`
1414
})
1515
class RouterTestComponent {
16-
@ViewChild(NSRouterLink, { read: NSRouterLink, static: false })
17-
nsRouterLink: NSRouterLink;
16+
@ViewChild(NSRouterLink, { static: false }) nsRouterLink: NSRouterLink;
1817
}
1918

2019
describe("NativeScriptRouterModule.forRoot", () => {

0 commit comments

Comments
 (0)