Angularjs about checkboxes and bootstrap cannot select bugs

Source: Internet
Author: User

When using Angularjs, there is a more obvious bug ng-disabled invalid case

Here is a case of a bug

<Divclass= "checkbox Mlh-specval-item"Toggle-class= "Selected"Ng-class= "{' selected ': specv.selected = = 1}"ng-disabled= "{{specv.selected = = 1}}"Ng-click= "Togglespec (SPECINFO.K, SPECV.V)">                                        <I></I>                                        <span>{{SPECV.V}}</span>                                    </Div>

In this case the ng-disabled is invalid and the workaround

<type= "checkbox"  class= "checkbox Mlh-specval-item"  Toggle-class= "selected"  ng-checked= "{{specv.selected = = 1}}"  ng-disabled= "{{specv.selected = = 1}}"  ng-click= "Togglespec (SPECINFO.K, SPECV.V) ">

Use the original control directly, do not apply Angularjs class= "checkbox Mlh-specval-item", there are other similar cases, such as button buttons, can not be used

You can also use a similar method, using native controls directly, in addition to the bootstrap style

This may be the ANGULARJS and bootstrap mixed use of the bug, the underlying reason is not traced, after all, I am a backstage

A little pit:

Angularjs as backstage or with ui-router, really egg ache, very waste of time, direct front desk use as a separate can

Angularjs about checkboxes and bootstrap cannot select bugs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.