Anyone know the cleanest way on how to reset a
FormControl's validators back to the original state?
.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.
The pipe 'date' could not be foundfrom the Material components: lazy-load tabs?
postalCodeinput field appropriately?
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?
emotionalplantso 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)
emotionalplantwhat was your question on named pipes?
emotionalplantand 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
emotionalplantpersonally 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
emotionalplanthope that helps
emotionalplantcurrently 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)
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.
@ubaa Hi I need your help please , when mostly are you on line ?
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: firstname.lastname@example.org