Angular issue while extending a subject class in Angular 10 in production mode
See original GitHub issueπ bug report
Affected Package
The issue is caused by package "@angular/animations": "~10.0.5","@angular/common": "~10.0.5",
"@angular/compiler": "~10.0.5",
"@angular/core": "~10.0.5",
"@angular/forms": "~10.0.5",
"@angular/platform-browser": "~10.0.5",
"@angular/platform-browser-dynamic": "~10.0.5",
"@angular/router": "~10.0.5",
Is this a regression?
Yes, the previous version(Angular 9) in which this bug was not present and this issue did not exist in Angular 11 also.This issue only exists in Angular 10 only
Description
we have a subject class in our project: βexport class OrdersService extends Subject <DataSource_1>β
while extending that subject class in Angular 10 in Production mode.
We have been getting null value while extending and the following error:
βUncaught TypeError: Class extends value undefined is not a constructor or nullβ.
π¬ Minimal Reproduction
This issue occurred due to extends the βSubjectβ class in Angular 10 in production mode.βexport class OrdersService extends Subject <DataSource_1>β
π₯ Exception or Error
**"Uncaught TypeError: Class extends value undefined is not a constructor or null".**
π Your Environment
Angular Version:
"@angular/animations": "~10.0.5",
"@angular/common": "~10.0.5",
"@angular/compiler": "~10.0.5",
"@angular/core": "~10.0.5",
"@angular/forms": "~10.0.5",
"@angular/platform-browser": "~10.0.5",
"@angular/platform-browser-dynamic": "~10.0.5",
"@angular/router": "~10.0.5",
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
rxjs - o.Subject is not a constructor - Angular 10 - Stack Overflow
I think you need to check the import statements for Subject . It must be imported like import { Subject } from "rxjs/Subject";...
Read more >Content projection - Angular
Components that use conditional content projection render content only when specific conditions are met. Single-slot content projectionlink. The most basic formΒ ...
Read more >48 answers on StackOverflow to the most popular Angular ...
An observable can be created from both Subject and BehaviorSubject using subject.asobservable() . Only difference being you can't send values toΒ ...
Read more >Using an NgRX Store Module in an Angular Application
This works fine for small applications. In some cases, as the application grows in size and multiple components start issuing calls to update...
Read more >Angular 5 Tutorial: Guide to Your First Angular 5 App - Toptal
But that may be a problem, too. Angular is a fully integrated framework that allows you to start working on your project quickly...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@praveenkumargspr As in many other cases, here, without a simple reproduction demo, itβs unrealistic that anybody can help with it. And the
simple
means really simple = with minimal dependencies, with code reduced only to the minimum of lines to make it as readable as possible.Please can you provide a reproduction of this problem that we can view?