question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rc.10 brake [ngClass]

See original GitHub issue

🐞 bug report

Affected Package

I think @angular/core

Is this a regression?

Yes, it work with rc.9

Description

When evaluating expression in tamplate form

🔬 Minimal Reproduction

<form (ngSubmit)="onSubmit3Months(f1)"
          novalidate
          #f1="ngForm">

<input [(ngModel)]="fromDate"
            #fd="ngModel"
            [ngClass]="{'is-invalid':fd.errors?.required && fd.touched || fd.errors && f1.submitted}"
            class="form-control form-control-sm"
            name="fromDate"
            id="fromDate3Month"
            type="date">
  <div *ngIf="fd?.errors?.required && fd.touched"
           class="invalid-feedback">
       Obvezno
   </div>
</form>

🔥 Exception or Error

There is no error in compile phase nor in dev console

🌍 Your Environment

Angular Version:





Anything else relevant?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
pkozlowski-opensourcecommented, Jan 27, 2020

@martinpirlot glad that you’ve got a work-around for rc.10 but the good news is that it was fixed in rc.11. Closing this issue.

3reactions
pkozlowski-opensourcecommented, Jan 24, 2020

@martinpirlot thnx for the stackblitz - it gives me the use-case! You probably can’t reproduce it with stackblitz since, AFAIK, it doesn’t run on ivy by default. In any case, the scenario is valuable.

I don’t want you to spend time tracking those things over the weekend - I think that I’ve got enough context here and I believe that I know what is going on here (plus, I think that it is fixed in master already).

I will poke around and ping you if I need more info. Thnx so much for getting back to us with more details!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NgClass - Angular
Object - keys are CSS classes that get added when the expression given in the value evaluates to a truthy value, otherwise they...
Read more >
2-1/2" NG class A shay. - Page 12 - The Home Machinist!
Mostly, I have been working on all the frame detail parts; Running board brackets, Truss rod brackets, brake beams, etc.
Read more >
Angular ngClass and ngStyle: The Complete Guide
In this post, we are going to learn the most commonly used options that we have available for styling our Angular components using...
Read more >
Hobby RC Braking System Parts for Nitro & Glow Fuel 1:10
Great deals on Hobby RC Braking System Parts for Nitro & Glow Fuel 1:10. Expand your options of fun home activities with the...
Read more >
Untitled
1/5 scale rc racing australia, Dress up 121, Los secretos de la nasa. ... The drama years review, 10 000 mcg biotin with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found