All files / src/app app.component.ts

69.23% Statements 9/13
100% Branches 0/0
50% Functions 1/2
72.73% Lines 8/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36                    1x 1x     1x       1x       1x     1x       1x         1x  
import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { loadModules } from 'esri-loader';
import { topographyProxyRule } from 'src/config/urls';
 
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'frontend';
 
  constructor(translate: TranslateService) {
    translate.addLangs(['fr', 'en']);
 
    // This language will be used as a fallback when a
    // translation isn't found in the current language.
    translate.setDefaultLang('fr');
 
    // The language to use. If it isn't available, the
    // current loader is used to get them.
    translate.use('fr');
  }
 
  ngOnInit() {
    this.init();
  }
 
  private async init() {
    const [urlUtils] = await loadModules(['esri/core/urlUtils']);
 
    urlUtils.addProxyRule(topographyProxyRule);
  }
}