Skip to content

Commit

Permalink
fix: disable environment header in standalone mode (#230)
Browse files Browse the repository at this point in the history
According to the sbb-angular docs [1], the sbb-header-environment
component should be disabled in production. Do so in standalone
mode.

Without this, a ribbon with a "standalone" text is displayed in
the top-left corner.

[1]: https://github.com/sbb-design-systems/sbb-angular/blob/main/src/angular/header-lean/header-lean.md#environment
  • Loading branch information
emersion authored Aug 8, 2024
1 parent 3593908 commit e25887e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- <sbb-option value="it">🇮🇹 Italiano</sbb-option> -->
</sbb-select>
</sbb-app-chooser-section>
<sbb-header-environment class="noprint">{{
<sbb-header-environment class="noprint" *ngIf="environmentLabel">{{
environmentLabel
}}</sbb-header-environment>
<sbb-usermenu
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {AuthConfig} from "angular-oauth2-oidc";

export interface Environment {
production: boolean;
label: string;
label?: string;
backendUrl?: string;
authConfig?: AuthConfig;
disableBackend: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/environments/environment.standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {Environment} from "./environment.model";

export const environment: Environment = {
production: true,
label: "standalone",
disableBackend: true,
customElement: true,
};

0 comments on commit e25887e

Please sign in to comment.