0

the problem is:

When i do ng serve --o the all proyect works..

when i do ng build --prod i have:

ERROR in src\app\tabs-incendio\tabs-incendio.component.html(183,64): : Expected 1 arguments, but got 0.

So i change this:

<h1>Coordenadas <button mat-button mat-raised-button (click)="addCordenadas()"><mat-icon>add</mat-icon><span>Agregar</span></button></h1>

For this adding the null..

<h1>Coordenadas <button mat-button mat-raised-button (click)="addCordenadas(null)"><mat-icon>add</mat-icon><span>Agregar</span></button></h1>

the addCoordenadas is:

addCordenadas(coordenada: Coordenada) {
    this.coordenadas.push(this.initCoordenada(coordenada))
  }

the initCoordenada is:

initCoordenada(coordenada: Coordenada) {
    if (coordenada) {

      return this.fb.group({
        dia : [coordenada.dia],
        latitudGrados : [coordenada.latitud.grados],
        latitudMinutos : [coordenada.latitud.minutos],
        latitudSegundos: [coordenada.latitud.segundos],
        longitudGrados : [coordenada.longitud.grados],
        longitudMinutos : [coordenada.longitud.minutos],
        longitudSegundos: [coordenada.longitud.segundos],
        latitudCoordenada : [coordenada.latitud.calculada],
        longitudCoordenada : [coordenada.longitud.calculada],
        altitud : [coordenada.altitud],
        gps : [coordenada.gps],
        carta : [coordenada.carta],
      });
    } else {
      return this.fb.group({
        dia : [''],
        latitudGrados : [''],
        latitudMinutos : [''],
        latitudSegundos: [''],
        longitudGrados : [''],
        longitudMinutos : [''],
        longitudSegundos: [''],
        latitudCoordenada : [''],
        longitudCoordenada : [''],
        altitud : [''],
        gps : [''],
        carta : [''],
      });
    }
  }

the problem is that in depelop works... but in production i cant see the button... Any help?

im not allowed to put ain image...if any helpmi email is marianoestevez10@gmail.com

ty!

1 Answers1

0

Your function addCoordenada expects you to pass an argument of a coordenada. The one that passes a null is okay. But the first one that is defined does not pass anything (empty parentheses). You need to make sure the function you call matches what is expected.

Also, you probably shouldn't have both mat-button and mat-raised-button directives. If you want mat-raised-button, only put that one and delete mat-button.

tommytarheel
  • 121
  • 4