Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoiding Visual Studio validation errors with Angular UI Bootstrap

Angular UI Bootstrap introduces several new HTML tags, such as accordion and accordion-group. Angular does a good job of teaching the browser new tricks to use these.

But how do I teach Visual Studio to not complain about unknown elements? Perhaps there is a way to tell Visual Studio about the tags or a way to write the HTML that doesn't use the non-standard tags.

like image 226
Edward Brey Avatar asked Feb 11 '14 21:02

Edward Brey


People also ask

What is angular validation in Bootstrap 4?

Angular Validation - Bootstrap 4 & Material Design. Examples & tutorial. - Material Design for Bootstrap Angular Bootstrap validation is set of validators which can be used on various form inputs to provide valuable and actionable feedback to users. In order to turn on validation for a specific form control, add the mdbValidate directive to it.

What is mdbvalidate in angular bootstrap?

Angular Bootstrap validation is set of validators which can be used on various form inputs to provide valuable and actionable feedback to users. In order to turn on validation for a specific form control, add the mdbValidate directive to it. The mdb-error and mdb-success components allow us to display validation messages under the form element.

How to add feedback on submit form validation in angular?

You can also add a “ .valid-feedback ”or “ .invalid-feedback ” message to tell the user explicitly what’s missing, or needs to be done before submitting the form. How to add feedback on submit form validation in angular? On button click below event will be fired which will find the form and check its validity.

How to install bootstrap UI framework in Angular 2?

Install Bootstrap UI framework via NPM using following command. Add the Bootstrap CSS path in styles array inside the angular.json file. Now we have configured Angular and Bootstrap, run the command to open the app in the browser.


2 Answers

All of ui-bootstrap's directives use A as a restrict value alongside of E.

So you can just do <div accordion-group></div>

like image 50
joshkurz Avatar answered Oct 12 '22 05:10

joshkurz


Visual Studio 2013 Update 4 removes the validation, however it does not include IntelliSense for AngularJS.

Support for custom elements, polymer-elements and attributes

We no longer validate unknown attributers for custom elements as there will be many custom made tags in different frameworks. So there will no longer be squiggles under the unknown elements.

— Announcing new Web Features in Visual Studio 2013 Update 4 RC

Download Visual Studio 2013 Update 4.

Validation is only removed in the HTML editor, not the HTML (Web Forms) editor. This means that, by default, .html files will not have custom element validation, but .aspx pages will. If, like me, you don't think this makes sense, show your support by voting for custom elements in .aspx files.

like image 45
jordanbtucker Avatar answered Oct 12 '22 06:10

jordanbtucker