question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attribute value is removed using AngularJS OR condition syntax

See original GitHub issue

I have this attribute: (where || is or condition in AngularJS) <element loading="vm.loadingData1 || vm.loadingData2 || vm.loadingData3"></element>'

Running htmlmin turn that into <element loading></element>

Is this expected?. If it is, I guess I am using a bad standard here to combine multiple boolean condition.

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
alexlamslcommented, Mar 27, 2016

indeterminate is a standard HTML boolean attribute for use with <input type="checkbox">

So the solution is to either rename your custom attribute (ng-indeterminate?) or don’t use collapseBooleanAttributes.

0reactions
huyphcommented, Mar 27, 2016

fair enough…will do once I get a chance 😉

Thanks for your time! Much appreciate !

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the best way to conditionally apply attributes in ...
I am using the following to conditionally set the class attr when ng-class can't be used (for example when styling SVG): ng-attr-class="{{someBoolean ...
Read more >
Developer Guide: Directives - AngularJS: API
$compile can match directives based on element names (E), attributes (A), class names (C), and comments (M). The built-in AngularJS directives show in...
Read more >
Top 18 Most Common AngularJS Developer Mistakes - Toptal
How can you instantiate new model values? There are two ways, in both of them you pass values to attributes. Consider this MainController:...
Read more >
Attribute binding - Angular
Attribute binding syntax resembles property binding, but instead of an element property between brackets, you precede the name of the attribute with the...
Read more >
Angular Validation - W3Schools
AngularJS also holds information about whether they have been touched, or modified, or not. You can use standard HTML5 attributes to validate input, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found