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.

@angular/elements behaviour nested component service injection different

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/elements

Is this a regression?

No

Description

Injection of service in parent component using in child components not using host instance. Different behaviour using native angular component and webelements.

πŸ”¬ Minimal Reproduction

https://stackblitz.com/edit/angular-ybq1fc?file=src%2Fapp%2Fapp.component.html

🌍 Your Environment

Angular Version:

Angular CLI: 8.0.1
Node: 12.4.0
OS: linux x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
abstractFlocommented, Oct 10, 2019

Push this up, we need this feature 😦

0reactions
angular-automatic-lock-bot[bot]commented, Nov 30, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hierarchical injectors - Angular
Hierarchical dependency injection enables you to share dependencies between different parts of the application only when and if you need to.
Read more >
Intro to Angular - Observables, Services, Nested Components
In this article we will be resuming our journey to learn Angular. This Part 2 of our series to cover Angular from all...
Read more >
A curious case of the @Host decorator and Element Injectors ...
This article dives deep into mechanics of @Host decorator in Angular. It introduces rarely seen notion of Element Injector and shows how it's...
Read more >
Testing Components with children - Testing Angular
They depend on the nested child Components, but also Injectables. These are classes, functions, objects, etc. provided via dependency injection,Β ...
Read more >
ASP.NET Core Razor components - Microsoft Learn
A component is a self-contained portion of user interface (UI) with processing logic to enable dynamic behavior. Components can be nested,Β ...
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