Cannot read property 'nativeElement' of null
See original GitHub issueHi
Everytime, I tried to use your ngx-infinite-scroll inside a <md-tab></md-tab>
I get the following error:
Cannot read property 'nativeElement' of null
Maybe the component is not ready yet, I don’t know but I didn’t have any condition to hide it. If it’s not in a <md-tab>
it works well 😃
This is my snippet code:
<md-tab label="{{'TITLE' | translate}}">
<md-card *ngIf="displayManagerCard$ | async">
<md-card-content>
<app-users-manager [userId]="userId"></app-users-manager>
</md-card-content>
</md-card>
</md-tab>
<app-users-manager> HTML
:
<app-display-list-users [infoToDisplay]='myObs$ | async' (onScroll)="scroll()"></app-display-list-users>
<app-display-list-users> HTML
:
<div class="infiniteScroll" fxLayoutWrap fxLayout="row" infiniteScroll [infiniteScrollDistance]="1" infiniteScrollContainer=".display-list-users-component"
[scrollWindow]="false" (scrolled)="onScroll.emit()">
<div fxFlex="100" class="display-list-users-component">fdghjdfhgjdfhgjfdgjfd</div>
</div>
Thank you in advance
Issue Analytics
- State:
- Created 6 years ago
- Comments:26 (9 by maintainers)
Top Results From Across the Web
Angular testing: Cannot read property 'nativeElement' of null
This is because when this test will run, your users array will be empty, and hence there will be no element in html...
Read more >Running Jasmine tests: TypeError: Cannot read property ...
i am using the above code getting the same error. i.e typeerror cannot read property 'nativeelement' of null. please help us ?
Read more >cannot read property of null angular unit testing - You.com
Problem is that you have not mocked the data for userService , hence it overrides the value you are setting. You should mock...
Read more >[Solved]-Angular Hybrid App Test "Cannot read property ...
Coding example for the question Angular Hybrid App Test "Cannot read property 'nativeElement' of null"-angular.js.
Read more >Unexpected Error: Cannot read property 'nativeElement' of null
Unexpected Error : Cannot read property 'nativeElement' of null ... everything fail. ... Post errors as text. Post code as code. ... I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kevincaradant thanks for reproducing. i reopened this one - i have a direction of how to fix this.
I updated my node and npm versions and it solved! 😃