These are chat archives for angular/material

28th
May 2018
naveen21f
@naveen21f
May 28 2018 06:37
hi my angular app became very slow because of ngFor ...any suggessions to make it faster? Im using infinite scrolling and appending new data to a variable used in ngFor.
becoming more slow when scolling down more, violation 'mousedown' handler took 4567ms
Kay van Bree
@kayvanbree
May 28 2018 12:14
@naveen21f I read somewhere that you can make events passive so it won't block scrolling. There is something about it here: https://developers.google.com/web/updates/2016/06/passive-event-listeners
I don't know if that's actually your problem though. It just sounds alike
naveen21f
@naveen21f
May 28 2018 13:17
@kayvanbree thanx i'll go thru
Kay van Bree
@kayvanbree
May 28 2018 13:18
Good luck
Dirt-Nasty
@Dirt-Nasty
May 28 2018 14:59
Hey. I'm pretty new to angular and been taking classes and they are mostly built around bootstrap. I wanted to use MD but I'm having some trouble.
With bootstrap I npm install and just add it to the angular.cli.json and call it a day. It looks like theres more to MD?
I have it working in my app-component.html but its not working in my other component html.
do I have do any importing on those components?
Lisa Copeland
@lisacopeland
May 28 2018 15:01
@Dirt-Nasty Read the getting started section of the Angular Material Guide - it is really straightforward
Did you add the imports to app.module?
Dirt-Nasty
@Dirt-Nasty
May 28 2018 15:01
yes
its working inside my app.component.html
but not in any other component I've created
Lisa Copeland
@lisacopeland
May 28 2018 15:02
What kind of error are you getting?
Dirt-Nasty
@Dirt-Nasty
May 28 2018 15:02
this might be more of me just having a better understanding of angular.
No error, the themeing isn't being applyed in my other components
Lisa Copeland
@lisacopeland
May 28 2018 15:05
is this an angular cli project?
Dirt-Nasty
@Dirt-Nasty
May 28 2018 15:05
yes
wait I think I got it..
I was expecting it to style ul and li
Lisa Copeland
@lisacopeland
May 28 2018 15:06
do you have the theme import in styles.css?
oh ok
Dirt-Nasty
@Dirt-Nasty
May 28 2018 15:06
I guess it doesnt work that way, I have to import the module for lists and then use the <mat-list> etc. right?
Lisa Copeland
@lisacopeland
May 28 2018 15:06
right
yeah - <mat-list><mat-list-item></mat-list-item></mat-list>
import each module you want to use in the app.module and then you can use it in each component
Dirt-Nasty
@Dirt-Nasty
May 28 2018 15:16
thank you!
Lisa Copeland
@lisacopeland
May 28 2018 15:26
@Dirt-Nasty NP