Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 18 2019 18:50
    @StephenFluin banned @piotr-mamenas
Latch Kostov
@latchezar-kostov-ascendlearning-com
Is there some sort of way to tell the cdk-virtual-scroll-viewportthat something has changed, and that it should re-render whatever has changed? It also seems to me that when I scroll and this component is no longer in my viewport, then I scroll back, and it is in my viewport, the changes that I am expecting are all there. Perhaps this is a side-effect of the fact that the instances of these components are cached?
Latch Kostov
@latchezar-kostov-ascendlearning-com
And I take this back. I found an issue with the component that wasn't changing.
Alexander Wieser
@crystalbyte
Guys, what must I do to refresh the view after adding a child node to the material tree data model?
Amin Bashanfar
@Amin-bash
Anyone knows why all of those radio items are selected
image.png
this is the code

<mat-menu #menu="matMenu" class="organizations-menu"> <mat-radio-group class="radio-group-column"> <mat-radio-button [ngClass]="{'active': activeWorkspace.id === userWorkspaces.personalWorkspace.id}" (click)="switchCurrentWorkspace(userWorkspaces.personalWorkspace.id)" > <span class="workspace-name">{{'ORGANIZATIONS.PERSONAL-WORKSPACE' | translate}}</span> </mat-radio-button>
<div class="organizations-list-title">{{'ORGANIZATION.INSTITUTION' | translate}}</div>

        <ng-container
          *ngIf="userWorkspaces.organizations && userWorkspaces.organizations.length > 0; else emptyOrganization">
          <mat-radio-button class="organization-menu"
                  *ngFor="let organization of userWorkspaces.organizations"
                  [ngClass]="{'active': activeWorkspace.id === organization.id}"
                  (click)="switchCurrentWorkspace(organization.id)"
          >
            <img [src]="organization.logo?.url | default: defaultOrgLogo" class="workspace-logo">
            <span class="workspace-name">{{organization.name}}</span>
          </mat-radio-button>
        </ng-container>

      </mat-radio-group>
    </mat-menu>

`

Bojan Kogoj
@BojanKogoj
Why do you use class for selected?
Amin Bashanfar
@Amin-bash
@BojanKogoj to change the design
Bojan Kogoj
@BojanKogoj
But you never set [selected]
Michael Prentice
@Splaktar
@power-amin you aren’t using Template or Reactive Forms?
@zzj0402_gitlab the navigation target is new in version 9.0.0 where you can use nav as well. In version 8.x, only nav works.
@zzj0402_gitlab make sure that you are looking at the documentation that matches your version. https://v8.material.angular.io/ in your case.
Michael Prentice
@Splaktar
@crystalbyte I had to set the dataSource.data to null and then to the new value to get that to work. You can see this demo: https://stackblitz.com/edit/mat-tree-update-data?file=src/app/tree-nested-overview-example.ts
Anthony Nahas
@AnthonyNahas

I am proud to publish ngx-auth-firebaseui v4 that supports angular v9

https://www.npmjs.com/package/ngx-auth-firebaseui
https://github.com/AnthonyNahas/ngx-auth-firebaseui/releases/tag/4.0.0

A big thanks for the community that is helping this library to grow up

I would like to head your feedback <3

Zijing Zhang
@zzj0402_gitlab
@Splaktar Thx
Zijing Zhang
@zzj0402_gitlab
How to use https://www.npmjs.com/package/@google-cloud/language with Angular? I keep getting compile error.
Brad
@bradtaniguchi
@zzj0402_gitlab Thats for nodej.js, which is a totally different environment then where Angular normally runs (the browser)
Zijing Zhang
@zzj0402_gitlab
@bradtaniguchi I am well aware but I don't think they are totally different.
Brad
@bradtaniguchi
They aren't when it comes to the language, but my guess is the machine learning lib was never designed for client side, either for security or for performance.
Zijing Zhang
@zzj0402_gitlab
Probably
mzrokz
@mzrokz
@power-amin Did you find solution to your problem ?
Amin Bashanfar
@Amin-bash
@mzrokz yeah, I found a solution thank you :)))
Alex
@alexcarrasco93
@alexcarrasco93
hello
i'm using angular material datepicker and everytime i write in an input an invalid date automatically change the value for a vaid value. For example i write "18/02/1993aaaaa" and when i blur the input it changes to "18/02/1993"
i want to get the event when the input value is already changed
i tried (dateInput) and (dateChange) EventsEmitters to catch it but the catch the invalid value "18/02/1993aaaaa"
Alex
@alexcarrasco93
the value changes because of the parse that is provided with MAT_DATE_FORMATS so i'd like to emit an event after this parse because ngmodelchange or datechange events emitter are not emitting nothing after it, when i log the value in both the result is "18/02/1993aaaaa" and not the parsed value
Amin Bashanfar
@Amin-bash
hello,
I have a modal with an upload btn when you click it it will show loading in that btn and I can upload a file from my computer, what I want is when I cancel the btn of the upload I want the loading to disappear
image.png
this is the btn
and this is when I click it
image.png
I can upload but if I click cancel
it will stay like this
image.png
how can I control the cancel btn like when cancel is clicked hide the loading
Bojan Kogoj
@BojanKogoj
How do you open file select?
Xephy Lon
@XephyLon
image.png
Any idea if there's a solution to this?
Bojan Kogoj
@BojanKogoj
I would report the issue
kpaxton
@kpaxton
In the upgrade to Angular 9 it mentioned to remove entryComponents from all NgModule declarations...
I have tests for the Snackbar provided by Material and I'm getting
No component factory found for SnackbarComponent. Did you add it to @NgModule.entryComponents?
when trying to run the tests.....
Any ideas?
BertrandMarechal
@BertrandMarechal
Hey, I am using it and have no issues, is your @angular/material at version 9 too ?
Michael Prentice
@Splaktar
@XephyLon yes, please open an issue with a StackBlitz or GitHub repo reproduction.
Latch Kostov
@latchezar-kostov-ascendlearning-com
Does Angular Material have a built in class for "muted text" color? Trying to clean-up some components where people have statically declared scss such as $muted-color : rgba(0,0,0,0.6);, and would like to use something that's part of the theme and color pallatte is such thing exists.
Michael Prentice
@Splaktar
Jamie
@d4nc3r

We'd like to add a data attribute to a mat-tab:

<mat-tab label="The Thing" data-test-id="the-thing-tab">
    <other-stuff />
</mat-tab>

The data-test-id attribute doesn't end up anywhere inside the html generated by the mat-tab component - is there a way I'm missing to get data attributes onto material tabs?

Brad
@bradtaniguchi
@d4nc3r If your adding attributes to the component that "disappears" you will have to go about adding that attribute somewhere else (maybe in the tab, or in a map/service?)
Jamie
@d4nc3r
@bradtaniguchi the purpose would be to "click" the tab itself during an e2e test, so adding it somewhere in the tab content wouldn't work for our case :(
Brad
@bradtaniguchi
If this is just for e2e testing, could you use the order of the tabs to select what you want? Or write a utility selector to "select" the tab based on some data within the tabs and get its parent. Not the best solution, but there is direct tab from the mat-tab component, since it is one of the components that gets vaporized
Jamie
@d4nc3r
Yah, we can use the id that material generates, it just makes our testers sad because they have to go find what the generated id is going to be (it doesn't change, so that's not a problem). Material replaces the components with a LOT of HTML, so it's sometimes hard for them to sort thru it all and find what they want to target, we were hoping to make it easier for them!
tp1906
@tp1906
Does anyone have an example of a directive that restricts input using regex but also allows for the validators to continue to work. I created a directive using ControlValueAccessor but it doesn’t show validation errors on matInput. When I remove the directive, validation errors are shown correctly. Do I need to provide matformfieldcontrol? Thanks in advance for any help!!