Comments (6)
Or with a single import statement:
import { Child, type Child as ChildType } from './child.component';
also works.
from angular.
This does seem like something our logic could support easily enough...
from angular.
Note that the issue also exist with the decorator query.
@ViewChild('test') child: Child
breakes defer while @ViewChild('test') child: any
doesn't present any issue.
from angular.
The use-case is to be able to call the child components methods without a need to create additional interfaces to work around this issue. We use it a lot in this way in the custom component library.
from angular.
I don't think the import removal analysis is capable of differentiating between type-position only imports.
You can get this to work using
import type { Child as ChildType } from './child.component';
so there isn't any need for an interface.
from angular.
Maybe this could be referenced in the docs as well ?
from angular.
Related Issues (20)
- https://angular.dev/guide/pipes page not found HOT 1
- Unnecessary white spaces inside tag (at the beginning and in the end of text) HOT 3
- docs: `window.ng globals` is rendered incorrectly in the API Reference navigation list
- viewChild.required() is lying about its type - please remove this API while it's still in developer preview! HOT 5
- Add recommended tools/extensions as part of the getting started tutorial
- ERROR TypeError: Cannot read properties of undefined (reading 'c') HOT 1
- Signal input migration throws "No inputs were found in config file" when run in CLI projects
- Wrong content children order when using ngTemplateOutlet to render HOT 3
- Link to license is not working
- Docs: `@NgModule` tags in the source code should be used to hint at the Module declaring the class
- Wrong usage of HostBinding in example code HOT 6
- Angular project creation failed in npm 9.0.7 HOT 5
- Feature Request: Support for @defer Blocks with Inline Styles and Third-Party Scripts HOT 2
- `provideClientHydration` is doing magic with the rendered HTML HOT 4
- Incorrect documentation for `setPosition` method in `AnimationPlayer` interface HOT 2
- Date pipe calculation with timezone offset is wrong at Daylight Saving Time transition HOT 3
- Error while trying to build docs locally on Windows 11 machine HOT 6
- Destructuring support for `@let` HOT 2
- Named route query params in ActivatedRoute don't work HOT 3
- Angular signals update/set method can be easly confused HOT 3
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.