I'd like to know if there's a way to tell Angular to generate a DIV instead of a new tag when inserting a component in a router-outlet. Right now, I have this component code:
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() {
}
}
Which renders to this in the final HTML:
<router-outlet></router-outlet>
<app-fwc-vpn-main class="ng-star-inserted"> ... </app-fwc-vpn-main>
What I would need is to generate a div with some added classes, so the final result would be something like this:
<router-outlet></router-outlet>
<div app-fwc-vpn-main class="grid-y medium-grid-frame"> ... </div>
NOTE: I need to add the grid-y
and medium-grid-frame
classes so the app has the correct layout. This is the main reason I want to change the inserted tag for this div.
Thanks in advance,