Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Rob
@borriej
so my spinner on the button never fires :s
RanadeepPolavarapu
@RanadeepPolavarapu

Anyone know the cleanest way on how to reset a FormControl's validators back to the original state?

Using .reset() resets the value, but not the validators on it. Any validators on it stay as-is.

There is also no clear way to fetch the existing validators on a FormControl as that is not part of the base reactive form API.

rbrose
@rbrose
How i can many lists merge to one list?
with cast to a model
so i have 6 Lists with any[] and want merge all to one model[]
Francis Rodrigues
@francisrod01
Please how to solve The pipe 'date' could not be found from the Material components: lazy-load tabs?
https://material.angular.io/components/tabs/overview
fb error screenshot
Francis Rodrigues
@francisrod01
Solved importing CommonModule in the respective module. ;p
Yaakov Chaikin
@ychaikin
Anyone can point me to a good explanation why <router-outlet> inserts the components next to it (i.e., as a sibling element) instead of inside of it as a child element?
Francis Rodrigues
@francisrod01
I think its selector comes from a component.
Martin Berriman
@Eskibrew_gitlab
I'm looking for some advice - I currently have a headless application running on linux and I also have a Qt application on the same machine. The Qt app can communicate with the headless app using named pipes (file system pipes, not Angular pipes). All that is fine. I would however like to replace the Qt app with an Angular app but I'm not sure whether I can communicate from Angular via named pipes. Is there a way for an Angular app to read and write local files?
w0rp
@w0rp
Does anyone know how to fix No provider for ComponentFactoryResolver. I have a service that uses that service, and it works when I build it as a development build, but it doesn't work when I build it with the production build, and I have no idea how to fix it.
It's like it's tree-shaking it away, and I don't know how to stop it from doing that.
Aubrey Quinn
@aubrey-fowler
Hi all, how can I use observables to filter my content? e.g. I have a list of items and the user may enter a search text in a box to filter the items
Aubrey Quinn
@aubrey-fowler
<ScrollView>
<StackLayout *ngIf="clockcardData$ | async as data">
<!-- clockcard -->
<ns-clockcard-table [max_clockings]="data.maxClockings" [clocking_days]="data.days"></ns-clockcard-table>
When you pas data into a child component, is it still an observable?
w0rp
@w0rp
I can't get tree shaking working when upgrading an old AngularJS component. It just seems to spit out errors saying it can't find ComponentFactoryResolver when loading any Angular component.
w0rp
@w0rp
I just gave up on it. I think the optimisations just don't work well in combination with a hybrid app. Some esoteric thing somewhere messes up.
Francis Rodrigues
@francisrod01

@ychaikin @ychaikin

Anyone can point me to a good explanation why <router-outlet> inserts the components next to it (i.e., as a sibling element) instead of inside of it as a child element?

I think its selector comes from a component.

How can I validate the schematic address-form postalCode input field appropriately?
I think we could start with a pattern, but let's try showing the error message for the numeric input (but I can't see a way to get the pattern message for the non-digits error.)
Magnus Grindal Bakken
@magnusbakken

Hello!

Although this may sound like a Material issue, it's actually a more general Angular question.

I'm trying to make a generic custom control that represents a "split button", which is a button with a main action on the left side and a dropdown that opens a menu on the right side. This is a fairly common UI element, but doesn't exist out of the box in Angular Material.

I've seen examples of people using mat-button-toggle-group to create this layout, e.g. https://stackoverflow.com/a/58672726/1696533. This works well, but I'm having issues with content transclusion. Here's what my HTML looks like:

<mat-button-toggle-group [disabled]="disabled">
  <mat-button-toggle class="main-button">
    <ng-content select="[main]"></ng-content>
  </mat-button-toggle>
  <mat-button-toggle class="dropdown-button" [matMenuTriggerFor]="menu">
    <mat-icon>arrow_drop_down</mat-icon>
  </mat-button-toggle>
</mat-button-toggle-group>
<mat-menu #menu="matMenu">
  <ng-content select="[menu]"></ng-content>
</mat-menu>

The usage should look like this:

<app-split-button>
  <ng-container main>
    <mat-button>Main button</mat-button>
  </ng-container>
  <ng-container menu>
    <mat-button mat-menu-item>Menu button 1</mat-button>
    <mat-button mat-menu-item>Menu button 2</mat-button>
  </ng-container>
</app-split-button>

The problem is that MatMenu doesn't apply the correct styles for the mat-menu-item selectors, because it isn't able to look inside the ng-content element. I've gathered that this is a well known limitation in Angular, and I suppose this would be the solution> angular/angular#8563. But I don't think that solution is getting implemented any time soon.

What's my best option here? It would be okay to transclude the entire menu and not just the inner buttons, but then what do I put in the matMenuTriggerFor attribute?

Alex
@alexandrupintilei
Hi guys
do you use GraphQL ?
rbrose
@rbrose
  []
      .concat(
        list1,
        list2,
        list3,
        list4,
        list5,
        list6,
      )
      .forEach((item) => newList.push(item as ItemModel));
Can i make this better?
nunobotelhokk
@nunobotelhokk
[...list1, ...list2, ...list3 etc] can't it be like that?
rbrose
@rbrose
But then item is the list and not the items in the list
nunobotelhokk
@nunobotelhokk
Check this and run it.
With the spread operator you are using the items inside each list
Martin Berriman
@Eskibrew_gitlab
It seems that no one is available to answer my question about named pipes (fifos in Linux) so perhaps I can ask the question differently instead; if you had a native application running on Windows or Linux and you wanted to use Angular as a front end GUI to control that application, how would you communicate between Angular and the native application?
matrixbot
@matrixbot
emotionalplant Martin Berriman (Gitter): you serve the angular payload on localhost and listen on some port on localhost, then send regular http requests to the server and pass them on to whatever application?
emotionalplant so write the server application urself and use that to translate/forward messages from gui to wherever, here how you forward the messages to the native application depends on the native application (usually they also listen on some port, or then has a prewritten client/interface which you call from shell)
matrixbot
@matrixbot
emotionalplant perhaps i misunderstood something if that's not what u want to do
emotionalplant what was your question on named pipes?
Martin Berriman
@Eskibrew_gitlab
Thank you :-) Currently my process (like a console application) uses named pipes (fifo on linux) to communicate with a GUI written in Qt. I had to idea to replace the Qt app with an Angular application but it looks like I would probably have to change the communication interface too.
matrixbot
@matrixbot
emotionalplant so what's the question on named pipes?
emotionalplant and yea for the gui -> backend you'll probably have to write your own server (or that's what i would do) that serves the website/app. Instead of listening on an other port you can just listen on the same port as you serve the app/website (often people use 80 or 8080) and then serve app from "/" and forward requests to "/api/native-app" to the native app
Martin Berriman
@Eskibrew_gitlab
Basically if/how to use a named pipe in Angular to talk to a native application. I have just found this which looks interesting - npm install fifojs (https://github.com/zacgeis/fifoJS)
matrixbot
@matrixbot
emotionalplant that will only run on node, you cannot run that from the angular app, although you COULD run it from the server if you decide to write in typescript/javascript and node
emotionalplant personally i would look at native solutions on the server side but if you want everything to be pure-js/ts and avoid shell commands or other languages then something like that could work
emotionalplant hope that helps
Martin Berriman
@Eskibrew_gitlab
Thanks. Yes, keen to avoid shell commands, want something more tightly integrated than that. Perhaps I should stick with Qt, it is working fine. Thanks for your help :-)
matrixbot
@matrixbot
emotionalplant np
matrixbot
@matrixbot
emotionalplant currently i am manually (or using npm script) running a pre-build script written in typescript, but I would like to mimic behavior of ng builders (where the js files don't stick around). Is the "easiest" solution for this going to be writing my own builder? (such as described in https://angular.io/guide/cli-builder)
Mirkenan Kazımzade
@Kenan7
I'm getting this error over and over again. there isn't single font loaded over the web. why is that?
Mixed Content: The page at 'https://x.vercel.app/' was loaded over HTTPS, 
but requested an insecure font 'http://fonts.gstatic.com/s/roboto/v18/KFOkCnqEu92Fr1MmgVxFIzIFKw.woff2'. 
This request has been blocked; the content must be served over HTTPS.
I don't even use Roboto
I don't get it
Mirkenan Kazımzade
@Kenan7
it was because of vlc media player extension
Usman Akram
@ubaa

@ubaa Hi I need your help please , when mostly are you on line ?

Hi Anjum,
yes please what kind of help do you need ?
I'm not that much active here
but you can send me a message on email: usmanakramali@gmail.com