Angular 隐藏该网站已与角

Angular 隐藏该网站已与角,angular,web,production,Angular,Web,Production,我想知道我是否有机会隐藏我的简单网站是用Angular制作的。我可以在网站上看到这个,我想所有的Angular网站都有这些标签,但是没有。那么,我可以用什么方式隐藏它们呢?相关 只需添加根组件即可删除版本属性: @Component({ selector: '[data-app]', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppCom

我想知道我是否有机会隐藏我的简单网站是用Angular制作的。我可以在网站上看到这个
,我想所有的Angular网站都有这些标签,但是没有。那么,我可以用什么方式隐藏它们呢?

相关

只需添加根组件即可删除版本属性:

@Component({
    selector: '[data-app]',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
})
export class AppComponent {
    constructor(private _elementRef: ElementRef) {
    }

    ngOnInit(): void {
        this._elementRef.nativeElement.removeAttribute("ng-version");
    }
}
当涉及到
\nghost
属性时,您似乎无法摆脱设置应用程序的方式,因为它指向了填充内容的位置,但是您可以创建一个新组件并在那里添加路由,这样如果您不希望它出现在根组件中,它会显示在树的下一步

注意:如票证相关讨论中所述,这可能主要用于生产版本,因为有些工具依赖于开发版本的属性。

相关

只需添加根组件即可删除版本属性:

@Component({
    selector: '[data-app]',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
})
export class AppComponent {
    constructor(private _elementRef: ElementRef) {
    }

    ngOnInit(): void {
        this._elementRef.nativeElement.removeAttribute("ng-version");
    }
}
当涉及到
\nghost
属性时,您似乎无法摆脱设置应用程序的方式,因为它指向了填充内容的位置,但是您可以创建一个新组件并在那里添加路由,这样如果您不希望它出现在根组件中,它会显示在树的下一步

注意:如票证相关讨论中所述,这可能主要用于生产构建,因为有些工具依赖于开发构建的属性