I am using an angular app (server based with Universal). I have the following code
app.component.ts
@Component({
  selector: 'app',
  templateUrl: './app.component.html'
})
export class AppComponent implements OnInit{
  constructor(private meta: Meta, private myService: MyService) {
  }
  ngOnInit() {
     this.myService.getData().subscribe(data => {
       this.meta.addTags([
        { name: data.name,   content: data.content}
      ]);
     })
  }
}
Here is my server.ts
import 'reflect-metadata';
import 'zone.js/dist/zone-node';
import { platformServer, renderModuleFactory } from '@angular/platform-server'
import { enableProdMode } from '@angular/core'
import { AppServerModuleNgFactory } from '../dist/ngfactory/src/app/app.server.module.ngfactory'
import * as express from 'express';
import { readFileSync } from 'fs';
import { join } from 'path';
const PORT = 4000;
enableProdMode();
const app = express();
let template = readFileSync(join(__dirname, '..', 'dist', 'index.html')).toString();
app.engine('html', (_, options, callback) => {
  const opts = { document: template, url: options.req.url };
  renderModuleFactory(AppServerModuleNgFactory, opts)
    .then(html => callback(null, html));
});
app.set('view engine', 'html');
app.set('views', 'src')
app.get('*.*', express.static(join(__dirname, '..', 'dist')));
app.get('*', (req, res) => {
  res.render('index', { req });
});
app.listen(PORT, () => {
  console.log(`listening on http://localhost:${PORT}!`);
});
This is adding the tag in my html but at runtime. If I try to view the source code, my meta tag isn't there. If I move the addTags directly at the start of the ngOnInit (with some hardcoded value) and not inside an subscribe, it appears directly in my source code.
I do expect a config to be missing in my server.ts (like waiting for the async calls to be done before rendering).