question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'nativeElement' of null

See original GitHub issue

Hi

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:closed
  • Created 6 years ago
  • Comments:26 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
orizenscommented, Oct 4, 2017

@kevincaradant thanks for reproducing. i reopened this one - i have a direction of how to fix this.

1reaction
lucashaenschcommented, Sep 27, 2017

I updated my node and npm versions and it solved! 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found