Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
GitWolf
@KellyVillalobos
@mlc-mlapis Your information is very much appreciated. Thank you.
Miloš Lapiš
@mlc-mlapis
@KellyVillalobos But your case looks like a not trivial one and pretty large, so if you would need some extra consultations, chat privately with me ...
Ijee
@Ijee

A few days ago I asked a question about the RouteReuseStrategy. It just does not preserve the state of the component with what I have. I got a code sandbox of my problem here if anyone could help me out.
https://codesandbox.io/s/nifty-river-st8wl?file=/src/app/app-routing.module.ts

I want to preserve the state of the info component in that example~

GitWolf
@KellyVillalobos
@mlc-mlapis I will. I am currently in the research phase to figure out if the phasing out process is feasible or if it will have to be replaced in full before releasing anything to the user.
Miloš Lapiš
@mlc-mlapis
@SanjokLimbu It's hard to only blindly guess what your code looks like.
@KellyVillalobos :thumbsup:
kelly
@kellyprankin
Using <mat-form-field> how can I get the mat-icon to hang on the right of the input?
kinda like the datepicker etc
ah, OK, in case anyone is interested, you can add the matSuffix directive
mogo-edenpark
@mogo-edenpark
@kellyprankin
 <input matInput (keyup)="applyFilter($event.target.value)" 
      placeholder="Filter">
    <mat-icon matPrefix>search</mat-icon>
kelly
@kellyprankin
Thanks :)
choubani amir
@amirensit

hello.
Any explanation about this return type:

createDb() {
    const heroes = [
      { id: 11, name: 'Dr Nice' },
      { id: 12, name: 'Narco' },
      { id: 13, name: 'Bombasto' },
      { id: 14, name: 'Celeritas' },
      { id: 15, name: 'Magneta' },
      { id: 16, name: 'RubberMan' },
      { id: 17, name: 'Dynama' },
      { id: 18, name: 'Dr IQ' },
      { id: 19, name: 'Magma' },
      { id: 20, name: 'Tornado' }
    ];
    return {heroes};
  }

Is it the equivalent of:

return {'heroes': heroes}

What is called this syntax ?

ishu mishra
@coderishu
Hi Folks
folks
  <ng-sidebar-container
    class="ng-sidebar-container"
    id="WidgetDateRange"
    style="display: contents"
    [style.visibility]="_WidgetDateRangeOpened ? 'visible' : 'hidden'"
  >
this visibility is working in chrome but not working in IE(asked by client to do)
tried display:none,block but not working
even tried opacity
Ikenna Okafor
@bot101
@coderishu, I have had this issue sometimes in the past but can't seem to remember how I fixed it. I think you need to set a height on ng-sidebar, not very sure.
ishu mishra
@coderishu
ah ! ok
Ikenna Okafor
@bot101
Just confirmed, you need to set a height on <ng-sidebar-container
ishu mishra
@coderishu
thats great let me check
Xava\du
@xavadu_twitter
how do you escape the &shy; (soft hypen) in the translation? I can not find a way to do it and I have the error [xmldom error] entity not found:&shy; for what I see could be a parser issue
oh, I see is an error of xliffmerge and not angular
Jorrit
@jorrit-wehelp
@xavadu_twitter I'd suggest just using the actual unicode character instead, without escaping. But if you must, would need numeric escape , so decimal or hex
Xava\du
@xavadu_twitter

@jorrit-wehelp the unicode is not rendering in HTML, I am just doing a test and the extraction tool of angular just remove it

in html
<div i18n="@@test">:provider_count Anbieter gefunden für Über&shy;weisungen &amp;zwischen :to_country_name und :from_country_name. Jetzt vergleichen</div>

generated xlf translation:
<source>:provider_count Anbieter gefunden für Über­weisungen &amp;zwischen :to_country_name und :from_country_name. Jetzt vergleichen</source>

strange

BTW the &shy; is an invisible character that say where a word can be break
Shaik Irfan
@Irfan354
hi there
am a beginner for angular
iam trying to execute a project
but am stucked at scripting
how to code the value that my app can run
if anyone can guide me for javascript and typescript how to do coding
itll be helpful
Xava\du
@xavadu_twitter
@Irfan354 follow the Angular tutorial to start https://angular.io/tutorial
cuznerdexter
@cuznerdexter

Hi, I have an issue with ViewContainers.
I have a custom structural directive = eg “permissionAccess" it selects data from my NGRX store and looks for matching permissions.
If no permission it clears the ViewContainer,
If has permission if Rebuilds the ViewContainer using the injected TemplateRef
(This all works fine - I have tested with Dom elements, Components, Views)
But… it fails to rebuild the ViewContainer if any of the Dom contains
ngIf directives.
Anyone know why this would happen?? I have no idea!
It even fails with the "*ngIf=“true”"

Template Example Works:

<div *cwbPermission=“'ADMIN'">
        <p>test container</p>
        <div>
          <p>Nested container1</p>
          <div>
            <p>Nested container2</p>
          </div>
        </div>
      </div>

Template Example Fails:

<div *cwbPermission=“'ADMIN'">
        <p>test container</p>
        <div *ngIf=“true">
          <p>Nested container1</p>
          <div>
            <p>Nested container2</p>
          </div>
        </div>
      </div>
cuznerdexter
@cuznerdexter
So, I am not sure if this the best approach to this issue but looks like it is working for me. I added a changeDetectorRef.detectChanges() after creating the template in the view container and the UI now updates as I expect. Not seen any issues so far.
 /**
  * Creates the template content
  */
  showContent(): void {
    this.viewContainer.remove();
    this.viewContainer.createEmbeddedView(this.templateRef, this.context, 0);
    this.cdref.detectChanges();
  }
itsmenabil
@itsmenabil
hey guys, im new to this, can anyone please help me solve this code so i can join codewars
function multiply(a , b){
a * b
}
mogo-edenpark
@mogo-edenpark
function multiply(a , b){
   return a * b;


}
@itsmenabil
nunobotelhokk
@nunobotelhokk
I'm having some issues validating a form control. I'm setting this as a validator:
[
                Validators.required,
                Validators.minLength(9),
                Validators.maxLength(32)
        ]
But it only gives me the required error
If i remove the required, the control is always valid...
any idea on what i'm missing?
I have exactly the same validation on another place and it works fine.
mogo-edenpark
@mogo-edenpark
this.userForm = this.userFB.group({
            username: [
                "",
                Validators.compose([
                    Validators.required,
                    Validators.minLength(3),
                    Validators.maxLength(200),
                ]),
            ],
nunobotelhokk
@nunobotelhokk
I tried that, no luck.
mogo-edenpark
@mogo-edenpark
<mat-error
                                                    *ngIf="
                                                        isControlHasError(
                                                            'roles',
                                                            'required'
                                                        )
                                                    "
                                                >
                                                    <strong>{{

                                                        "AUTH.VALIDATION.REQUIRED_FIELD"
                                                            | translate
                                                    }}</strong>
                                                </mat-error>
    isControlHasError(controlName: string, validationType: string): boolean {
        const control = this.userForm.controls[controlName];

        if (!control) {
            return false;
        }
        const result =
            control.hasError(validationType) &&
            (control.dirty || control.touched);
        return result;
    }
This will solve