Repository: angular
Issue: Duplicate views
Labels: type: bug/fix,freq1: low,area: router,state: confirmed,router: config matching/activation/validation,P4

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🐞 bug report

### Affected Package
<!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->
<!-- ✍️edit: --> I think that the issue is caused by package **@angular/core**


### Is this a regression?

<!-- Did this behavior use to work in the previous version? -->
<!-- ✍️--> Probably not. I've tried it only in **Angular >=7.0.0**


### Description

<!-- ✍️--> View of the child component duplicates two times.
If you run `detectChanges()` manually in the root (app) component and you have incomplete observable in the one of the child component then the view of it will be displayed twice. Seems that Angular can't detach (or remove) the view if there are some observable in progress. It only happens when the child component rendered via the routing process and doesn't reproduced if the parent component contains it in the template directly.


## 🔬 Minimal Reproduction
<!--
Please create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2
-->
<!-- ✍️--> 
[https://stackblitz.com/edit/angular-8wr99p?file=src%2Fapp%2Fapp.component.ts](https://stackblitz.com/edit/angular-8wr99p?file=src%2Fapp%2Fapp.component.ts)

1. _app.ts_
```typescript
ngOnInit() {
  this.loaderService.getLoaderObservable().subscribe(show => {
    this.showLoader = show;
    this.changeDetectionRef.detectChanges();
  });
}
```
2. _info-child-1.ts_
```typescript
constructor(httpClient: HttpClient, loaderService: LoaderService) {
  loaderService.show();
  httpClient.get('https://raw.githubusercontent.com/ag-grid/ag-grid-docs/master/src/olympicWinners.json')
    .subscribe(response => {
      loaderService.hide();
    });
}
```
3. The result
![image](https://user-images.githubusercontent.com/12528704/51669769-70067300-1fc5-11e9-9dfb-b622d0ae8843.png)


<!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.

Issues that don't have enough info and can't be reproduced will be closed.

You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->

## 🔥 Exception or Error
<pre><code>
<!-- If the issue is accompanied by an exception or an error, please share it below: -->
<!-- ✍️-->
</code></pre>
## 🌍  Your Environment
Windows 10
**Angular Version:**
<pre><code>
Angular CLI: 7.0.7
Node: 10.0.0
OS: win32 x64
Angular: 7.2.2
... common, compiler, core, forms, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.10.7
@angular-devkit/build-angular     0.10.7
@angular-devkit/build-optimizer   0.10.7
@angular-devkit/build-webpack     0.10.7
@angular-devkit/core              7.0.7
@angular-devkit/schematics        7.0.7
@angular/cli                      7.0.7
@angular/compiler-cli             7.0.4
@angular/language-service         7.0.4
@ngtools/webpack                  7.0.7
@schematics/angular               7.0.7
@schematics/update                0.10.7
rxjs                              6.3.0
typescript                        3.1.6
webpack                           4.19.1


</code></pre>

**Anything else relevant?**
<!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->

<!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->