This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile | |
# FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 | |
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/base/Dockerfile | |
FROM nvidia/cuda:11.7.1-base-ubuntu22.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 libcairo2-dev pkg-config python3-dev && rm -rf /var/lib/apt/lists/* | |
RUN adduser --disabled-password --gecos '' user | |
RUN mkdir /content && chown -R user:user /content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-comp', | |
templateUrl: './app-comp.component.html', | |
providers: [ | |
{ | |
provide: TRANSLOCO_LOADING_TEMPLATE, | |
useValue: '<p>Translation is loading...</p>' | |
} | |
] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TestBed, async } from '@angular/core/testing'; | |
import { RouterTestingModule } from '@angular/router/testing'; | |
import { AppComponent } from './app.component'; | |
import { getTranslocoModule } from './transloco-testing.module'; | |
describe('AppComponent', () => { | |
beforeEach(async(() => { | |
TestBed.configureTestingModule({ | |
imports: [ | |
getTranslocoModule(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TranslocoMessageFormatModule } from '@ngneat/transloco-messageformat'; | |
@NgModule({ | |
imports: [ | |
TranslocoMessageFormatModule.init() | |
] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { HttpClientModule } from '@angular/common/http'; | |
import { TranslocoRootModule } from './transloco-root.module'; | |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
import { TranslocoLocaleModule } from '@ngneat/transloco-locale'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onChange(target) { | |
this.translocoService.setActiveLang(target); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h5>{{ componentVariable }}</h5> | |
<h5>{{ componentVariableSecond }}</h5> | |
<label for="lang">Choose a language:</label> | |
<select (change)="onChange($event.target.value)" id="lang"> | |
<option *ngFor='let l of languages' [value]="l.code">{{l.label | transloco }}</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "English title", | |
"hello": "Welcome", | |
"containers": "ng-containers are useful when you don't want to have too many html layers", | |
"dashboard": { | |
"description": "You may use scopes for structuring translations" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { HomeComponent } from './home.component'; | |
import { RouterModule } from '@angular/router'; | |
import { TranslocoRootModule } from '../transloco-root.module'; | |
import { TranslocoLocaleModule } from '@ngneat/transloco-locale'; | |
@NgModule({ | |
declarations: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { HomeComponent } from './home.component'; | |
import { RouterModule } from '@angular/router'; | |
import { TranslocoRootModule } from '../transloco-root.module'; | |
import { TranslocoLocaleModule } from '@ngneat/transloco-locale'; | |
@NgModule({ | |
declarations: [ |
NewerOlder