facebook

ngFor: If a function get iterable objects, class of iterables isn't recognized

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #536206 Reply

    ber000
    Participant

    With webclipse 1.8.3.201, when using a ngFor and a function to get iterable objects, the type/fields of iterable objects isn’t recognized. It works fine if the iterable objects are get with a field.

    // Typescript code is just for an example, doesn’t make sense. In practice a sort was applied in the function.

    export class Audit {
    constructor(
    public principal: string,
    public timestamp: string,
    public type: string
    ) { }
    }
    export class AuditsComponent {
    audits: Audit[];
    getAudits() {
    return audits;
    }
    getAuditsTyped(): Audit[] {
    return audits;
    }
    }

    Websclipse doesn’t identify audit class when getAudits() is used:
    <tr *ngFor=”let audit of getAudits()”>
    <td>{{audit.type}}</td>
    </tr>

    Websclipse doesn’t identify audit class when getAuditsTyped() is used:
    <tr *ngFor=”let audit of getAuditsTyped()”>
    <td>{{audit.type}}</td>
    </tr>

    Websclipse identifies well audit class when a field is used instead of a function:
    <tr *ngFor=”let audit of audits”>
    <td>{{audit.type}}</td>
    </tr>

    #536376 Reply

    support-swapna
    Moderator

    ber000,

    Thank you for the example code. I could replicate the validation problem when using the function in ngFor.
    The dev team is looking into it. We will keep you posted when the fix is out.

    Thank you for reporting it.

    –Swapna
    MyEclipse Support

    #541929 Reply

    Brian Fernandes
    Moderator

    This issue has been fixed for the 2017 CI 9 release, that’s due in the next few days.

    We did put out a pre-release of CI 9 which does contain this fix, so if you would like to try it out immediately, please follow the instructions in this thread: https://www.genuitec.com/forums/topic/webclipse-angular-ide-prerelease-stream/

    If you do try out the pre release, do let us know if your issue was fixed, if not, we’ll hopefully be able to correct it before the final release.

    #544300 Reply

    support-swapna
    Moderator

    ber000,

    Webclipse 2017 CI 9 is out with the fix for the issue you reported. Please go to Help > Webclipse > Check for Updates, update to CI 9 and let us know how it works for you.

    –Swapna
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: ngFor: If a function get iterable objects, class of iterables isn't recognized

You must be logged in to post in the forum log in