🐞 bug report

Affected Package
The issue is caused by package @angular/core
Is this a regression?
No
Description
Issue happens in zone-less environment when routing is used. If you remove <router-outlet></router-outlet> from app component template and put <app-counter></app-counter>, everything works fine.
Problem makes ɵmarkDirty(this) that is called immediately in ngOnInit method of counter component (see bellow Workaround 1). Then, when you click on increment or decrement button, rootContext.flags is equal to 1 (DetectChanges) instead of 0 (Empty), and because of that, tick is never scheduled:

🔬 Minimal Reproduction
- Clone https://github.com/markostanimirovic/zoneless-routing-bug repo
- Run
npm install
- Run
npm start
- Click on increment/decrement buttons, observe that count value is not changed
- Navigate to Counter 2, observe that count paragraph disappeared
- Navigate back to Counter, observe that count paragraph disappeared too
Workaround 1
- Open
counter.component.ts file
- Comment out lines 24-29
- Uncomment lines 32-38
Workaround 2
- Open
app.component.ts file
- Swap
ɵmarkDirty(this) with ɵdetectChanges(this) on line 21
🌍 Your Environment
Angular Version: 10.1.6
🐞 bug report
Affected Package
The issue is caused by package @angular/coreIs this a regression?
NoDescription
Issue happens in zone-less environment when routing is used. If you remove
<router-outlet></router-outlet>from app component template and put<app-counter></app-counter>, everything works fine.Problem makes
ɵmarkDirty(this)that is called immediately inngOnInitmethod of counter component (see bellow Workaround 1). Then, when you click on increment or decrement button,rootContext.flagsis equal to1 (DetectChanges)instead of0 (Empty), and because of that, tick is never scheduled:🔬 Minimal Reproduction
npm installnpm startWorkaround 1
counter.component.tsfileWorkaround 2
app.component.tsfileɵmarkDirty(this)withɵdetectChanges(this)on line 21🌍 Your Environment
Angular Version: 10.1.6