facebook

Validating Angular templates and other files automatically

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #632502 Reply

    Krasimir
    Participant

    I have MyEclipse Codemix Angular Project and when I change for testing purpouse the name of some function in TS file (the function is called in html template) and save this file, validation of the coresponding html template is not done and I can’t see the error in html file. When I run validation manually, I can see error. Is there a way of automatically starting validation after file saving?

    #632660 Reply

    support-swapna
    Moderator

    Krasimir,

    Can you please clarify if the said HTML template file is opened in the editor area?

    CodeMix supports two types of validations. One is the in-editor validation which takes effect on the files which are already opened in the editor.
    The other is the project validation which makes use of the build pipelines and updates the errors for the files which are not open in the editor.
    Please see this document for detailed workings of the CodeMix validation : https://www.genuitec.com/docs/assembly/build-pipelines/

    In case you are looking to validate the html files that are not opened in the editor, then you have to go with project validation which needs to be manually invoked. In the editor area, you will see the Angular control panel, click on it and then click on the ‘Validate & Lint’.

    Hope this helps. Please let us know if you have any further questions.

    –Swapna
    Genuitec Support

    #632727 Reply

    Krasimir
    Participant

    Hello Swapna,

    Thank you for your answer.

    Note: I have installed the last version of the MyEclipse, CodeMix, Node.js, …

    For example, I have opened two files: HTML template and TS file, when I update TS file and save it, the HTML template state (e.g. red cross icon) is not updated even if the HTML is opened in editor area (but not active), the state is updated only when I activate HTML template (click on Tab with HTML template). This way I’m not able to check instantly if my change in TS file is OK or not.

    Is there possibility to run action ‘Validate & Lint’ on save or to map this action to some key shortcut (now I have to click three times to run it)?
    Another issue is that the red cross indicating error is shown on the folder app icon, not on the file app.component.html icon.

    Further I have some problems with using of CSS:

    1) validation doesn’t work for class property values, for example:
    app.component.css:
    .my-background-color {
    background-color: blue;
    }
    app.component.html:

    <p class=”MMMmy-background-color”>Hello</p>

    When I am editting html template or even when I validate project, no error or warning is shown for non existing class “MMMmy-background-color”

    2) content-assist (Ctrl+space) doesn’t work for the value of class property (class=”Ctrl+space…”), in the list there aren’t loaded classes from the CSS file

    Thank you

    #632739 Reply

    Krasimir
    Participant

    Update:
    – after restarting MyEclipse the red cross icon is correctly shown on the file app.component.html icon

    – by clicking on the icon “Check for Project issues…” and marking checkbox “Remember for this Project” I have redused the number of clicks for validating to one.

    Problems whit using of CSS persists.

    #632821 Reply

    support-swapna
    Moderator

    Krasimir,

    Glad that the template related issues are resolved.
    Regarding the CSS related issues, it is a known limitation with CSS and I have filed a report with the dev team to investigate the possibilities of a fix. We will keep you posted about our findings.

    Apologies for inconvenience caused. Please let us know if you see any other issues.

    –Swapna
    Genuitec Support

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Validating Angular templates and other files automatically

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