Comments (7)
It's super annoying to have to create a boolean set to true, just to bind a static class to a component. It's so much cleaner to use the host property for a static string binding. Really feels like I'm fighting the compiler to do something "the right way" and the compiler is forcing me to do it "the wrong way".
from codelyzer.
I disabled this lint rule since there is 0 argument for avoiding host
when binding literals. I often bind tabindex
or aria-*
o role
up there. It makes much more sense than polluting the class with public stuff all over the place just to bind to the host. If we could have what the issue suggests, it would be useful again.
from codelyzer.
@mgechev Seeing that the styleguide issue is closed, would there be any chance we could make this configurable in some way? By adding some 'allow-constant-values'
setting to the rule?
from codelyzer.
@eppsilon would you open an issue for this in the angular.io repository. Here's a template issue angular/angular.io#1301.
from codelyzer.
Closing it for now. @eppsilon let me know if the style guidelines change if I don't notice.
from codelyzer.
I'd prefer to collect some more votes here.
from codelyzer.
I think the option should be considered. I understand this is prefer, but in the case I have a value I know it won't ever change, having Angular checking if it did change in the check detection cycle seems like a waste of resources for me.
from codelyzer.
Related Issues (20)
- Dependency Dashboard
- Support for Angular 10
- Update codelyzer support for Angular v13 HOT 3
- Angular 14 HOT 2
- Update Angular to resolve vulnerability CVE-2021-4231 HOT 3
- Deprecated dependency "[email protected]"
- tslint 6 compatibility HOT 5
- Support for Angular 8.x.x HOT 1
- directive-selector throws an error when it comes across an empty @Directive() HOT 2
- [feature request]: Add a new rule validate decorators
- Support Angular 10 HOT 15
- No changelog for version 6.0.0 HOT 7
- [Feature Request] Rule: Inputs, Outputs and lifecycle methods on top HOT 1
- [feature request]: Allow aria-label to suppress template-accessibility-alt-text violation
- component-class-suffix does not work. HOT 5
- 5.3.0 not published on NPM HOT 6
- How to Run Codelyzer
- @angular/core and @angular/compiler explicitly listed as dependencies in published package.json HOT 5
- [feature request]: Allow aria-label to suppress template-accessibility-elements-content violation HOT 1
- template-click-events-have-key-events throws error on anchor <a> element
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codelyzer.