Angular - Check if all options are selected to enable button

前端 未结 3 407
礼貌的吻别
礼貌的吻别 2020-12-22 05:32

This is a quiz app, in this scenario my next button will redirect to another page and it\'s disabled by default. If I choose all the options it shou

3条回答
  •  甜味超标
    2020-12-22 06:08

    The answers will work, but you can make it the Angular way shown here:

    https://angular.io/guide/forms-overview

    There are 2 ways: template-driven or reactive forms

    Then you can bind disabled property to the form valid property.

    Choose what’s suits best to your needs. Hope it will be helpful.

提交回复
热议问题