Comments (3)
Would this be a significant improvement over:
@Component({
...
providers: [
{
provide: ID,
useFactory: () => inject(Cmp).id,
},
],
})
class Cmp {
readonly id = input.required<string>();
}
which works today?
from angular.
Note that additionally, it's possible for downstream components to inject Cmp
directly and have access to its input signals if desired.
from angular.
(going to close this as the existing featureset covers this use case pretty well without adding new complexity to declaring inputs)
from angular.
Related Issues (20)
- ControlValueAccessor's setDisabledState should be called before the validate function is called HOT 3
- Control flow migration: *ngIf under switch doesn't migrate to new syntax HOT 5
- Unable to use `HostAttributeToken` on application root component HOT 2
- Exception when using null coalescing operator in @for track expression HOT 2
- baseUrl link broken HOT 1
- docs: link with extra whitespace in NgComponentOutlet HOT 1
- Invalid self-closing element in index HTML file: '<app-root/>'. HOT 5
- bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) HOT 1
- Why doesn't my computer call the api to update, but someone else's computer calls the api to update? HOT 2
- computed efficieny improvement HOT 8
- Assets for Tutorial to angular no longer exist HOT 1
- Page not opening properly HOT 2
- Redirect doesn't work: pipes API documentation HOT 1
- Documentation is not reproducing descriptions associated with JSDoc @returns tag in angular.dev site HOT 1
- Add $inject function inside template HOT 3
- ComponentFixture.whenStable doesn't detect event emitted from async output in zoneless CD HOT 6
- Extended diagnostic error when binding an event to an uncalled function HOT 1
- Generate Directive Page not found
- Link broken in the Angular Tutorial Example HOT 5
- component-tree.ts:352 Angular DevTools: Could not serialize injector. HOT 1
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 angular.