[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
Current behavior
With AOT, for routes lazily loading modules, the meta tags are not being updated, instead, those get cleared out. It works as expected by using JIT, tho.
Example:
app-routing.module.ts
const routes: Routes = [
{
path: 'home',
canActivateChild: [MetaGuard]
loadChildren: './home/home.module#HomeModule',
data: {
meta: { // this doesn't take effect with AOT. Neither using canActivate nor canActivateChild
title: 'my title',
description: 'my description'
}
}
},
];
I'm submitting a ... (check one with "x")
Current behavior
With AOT, for routes lazily loading modules, the meta tags are not being updated, instead, those get cleared out. It works as expected by using JIT, tho.
Example:
app-routing.module.ts
home-routing.module.ts
Expected/desired behavior
The root route should update their tags properly with the data stated in the
data
section as well as the child routes that are lazily loaded.Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
Angular version: 4.0.1
Browser:
[x] Chrome (desktop) version XX
[x] Chrome (Android) version XX
[x] Chrome (iOS) version XX
[x] Firefox version XX
[ x] Safari (desktop) version XX
[x] Safari (iOS) version XX
[x] IE version XX
[x] Edge version XX
For Tooling issues:
Node version: 8.3.0 <!-- run
node --version
-->Platform: Mac
Others: