Description
Which @angular/* package(s) are relevant/related to the feature request?
compiler
Description
Currently, template dependencies for standalone components are imported and configured within TypeScript files, even though their main application is within HTML templates. This establishes a gap between where the dependencies are defined and where they are implemented.
Proposed solution
I propose a syntax that allows dependencies to be directly imported into the HTML template files. Taking inspiration from the proposed "let syntax" #15280 , the proposed syntax could be:
@import {NgClass , NgStyle} from "@angular/common"
<div [NgClass]="something" ></div>
<!-- or -->
<div [ngStyle]="something" ></div>
@defer(..){
@import {SomeComponet} from "something";
<SomeComponet />
<!-- or -->
<some-componet />
}
Moreover, Imports could also be scoped to deferred blocks for lazy loading.
Alternatives considered
None