Is there a way to instruct Angular to generate a DIV instead of another tag when inserting a component into a router-outlet? Currently, the component code looks like this:
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-fwc-vpn-main',
templateUrl: './fwc-vpn-main.component.html',
styleUrls: ['./fwc-vpn-main.component.css'],
encapsulation: ViewEncapsulation.None
})
export class FwcVpnMainComponent implements OnInit {
numbers = new Array(35);
constructor() { }
ngOnInit() {
}
}
What is currently rendered in the final HTML is:
<router-outlet></router-outlet>
<app-fwc-vpn-main class="ng-star-inserted"> ... </app-fwc-vpn-main>
The desired output would be:
<router-outlet></router-outlet>
<div app-fwc-vpn-main class="grid-y medium-grid-frame"> ... </div>
Please note that the grid-y
and medium-grid-frame
classes need to be added for proper layout. This is why changing the inserted tag to a div is necessary.
Thank you,