Angular CSS Demo [Angular Tutorial]

In this section, we will further discuss Angular CSS demo classes through the following exercises.

Here, Instead of writing ng-valid, ng-pristine, etc. one by one, we can call it all by using className. It will fetch the validity of a given variable, in this case, #stockName and #stockCode.

angular css demo

angular css demo

Success – the current state of validations are shown.

Next let’s try to click the stock name input field.

angular css demo

Once the selected field lost the focus, blur event is triggered. Therefore, it has been touched.

angular css demo

Next let’s try to input a value. Since a value was already provided, it should be changed to ng-dirty

angular css demo

All done!

Subscribe Now and Upgrade Your Skills Today!
Sign up now and have the latest tech tutorials delivered straight to your mailbox.

PLUS: Get exclusive member-only discounts (up to 80% OFF!!) on our top tech courses in Udemy!
We hate spam. Your email address will not be sold or shared with anyone else.