Tagged: html validation
- This topic has 4 replies, 2 voices, and was last updated 6 years, 2 months ago by ceter.
-
AuthorPosts
-
ceterParticipantPreviously working on a project in VS code but the lack of HTML validation was causing me problems. Downloaded Angular IDE to try to solve it but after loading into the IDE HTML validation doesn’t seem to be happening. (I have a couple of bugs in my code left to test the validation and they are not triggering). Creating a new project has working validation. Tracking through old posts got me to https://www.genuitec.com/forums/topic/validation-and-completion-do-not-work-out-of-the-box/
While I wasn’t having a lot of luck finding significant seeming differences between the two under properties/typescript the imported project only reports a typescript version and not an angular version.
support-swapnaModeratorCeter,
Thank you for trying Angular IDE. Sorry that you are seeing issues with validation. We tried to replicate the problem with few projects but do not see any problems with the validation in Angular HTML files.
Can you please give us some more details?
1. Is the project created in VSCode or in Angular IDE? If it is created in VSCode, then can you please let us know how you have imported it to the Angular IDE?
2. Is the project listed in the Servers view under Angular CLI node? All the Angular CLI projects will be listed there. If it isn’t then the project is not being recognized as one.
3. Do you see the validation working for TypeScript files? Is it only in the Angular HTML files that you see the problem?
4. If possible, please share with us the code snippet for which the validation fails to help us investigate further. It would help if you can also share your project. You can export the project (without the node_modules folder) to a zip file and attach it here.
Apologies for inconvenience caused.
–Swapna
Genuitec Support
ceterParticipant1) The project was created in VSCode. Open Project from File System matches what I recall from trying to import it to Angular IDE.
2) It is listed under servers view.
3) As far as I can tell validation is working for Typescript. Only Angular HTML is not recognizing errors.
4a)
<mat-form-field> <mat-select placeholder="Authentication Method" [(value)]="securityType" [disabled]="info.disabled"> <mat-option *ngFor="let type of SecListKeys()" [value]="type"> {{wombat}} </mat-option> </mat-select> </mat-form-field>
wombat is a bogus variable that doesn’t exist in the typescript. I put this error in to simplify the test environment.
4b)
<mat-form-field> <input matInput placeholder="User" [ngModel]="info.policyInfo.destination?.basic?.username" (ngModelChanged)="info.policyInfo.destination.basic.username" [disabled]="info.disabled"> </mat-form-field>
Here the error is ngModelChanged instead of ngModelChange which was the mistake that originally made me decide I needed better help on this front. If this isn’t enough information I can check if the full project can be sent.
support-swapnaModeratorceter,
Thank you for the code snippets. I could replicate the validation problems at my end.
I checked with CodeMix‘s editor and see the incorrect variables being validated and reported as errors.We are integrating AngularIDE and CodeMix very soon. So you can either choose to wait for the newer version or try to install the CodeMix plugin from the Marketplace for the time being and check if it improves the validation experience for you.
I have raised a bug for the missing validation on ngModelChanged. We will keep you posted when that is fixed.
Apologies for inconvenience caused. Please let us know if you have any questions.
–Swapna
Genuitec Support
ceterParticipantThanks for the info.
-
AuthorPosts