Property 'required' does not exist on type '{ [key: string]: any; }'


#1

I have the next problem:

Cannot find name ‘getAttr’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/login/login.ts:19:17: Cannot find name ‘pNames’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/login/login.ts:21:20: Cannot find name ‘PATH_CATALOGOS_ESPECIALIDADES’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/login/login.ngfactory.ts:666:29: Supplied parameters do not match any signature of call target.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/login/login.ngfactory.ts:709:85: Property ‘required’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/login/login.ngfactory.ts:750:85: Property ‘required’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:965:88: Property ‘required’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:970:88: Property ‘email’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:975:88: Property ‘maxlength’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1038:88: Property ‘required’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1043:88: Property ‘minlength’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1048:88: Property ‘maxlength’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1111:88: Property ‘required’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1116:88: Property ‘minlength’ does not exist on type ‘{ [key: string]: any; }’.
Error at C:/abraham_new/ImmerMedical/.tmp/pages/register/register.ngfactory.ts:1121:88: Property ‘maxlength’ does not exist on type ‘{ [key: string]: any; }’.
at check (C:\abraham_new\ImmerMedical\node_modules@angular\tsc-wrapped\src\tsc.js:31:15)
at Tsc.typeCheck (C:\abraham_new\ImmerMedical\node_modules@angular\tsc-wrapped\src\tsc.js:86:9)
at C:\abraham_new\ImmerMedical\node_modules@angular\tsc-wrapped\src\main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

My code:

import { Component } from ‘@angular/core’;

import { LoadingController, NavController } from ‘ionic-angular’;
import {Http} from ‘@angular/http’;
import {RegisterPage} from ‘…/register/register’;
import ‘…/…/assets/js/utils.js’;

@Component({
selector: ‘page-login’,
templateUrl: ‘login.html’
})
export class LoginPage {
loading : any;
public dataLogin = {‘correoElectronico’:’’, ‘contrasena’:’’};

constructor(private http:Http, public loadingCtrl: LoadingController, public navCtrl: NavController) {
console.log(‘constructor of LoginPage’);
this.loading = loadingCtrl.create({content: ‘Favor de esperar…’});
if (getAttr(pNames.cEspecialidades) == null){
this.loading.present();
this.http.post(PATH_CATALOGOS_ESPECIALIDADES,{}).subscribe(data => {
console.log(data);
this.loading.dismiss();
},
err => {
console.log(‘Error:’ + err);
this.loading.dismiss();
});
}
}

public access(){
console.log(‘access to login:’+ this.dataLogin);
this.loading.present();
setTimeout(() => {
this.loading.dismiss();
}, 5000);
}

public register(){
this.navCtrl.push(RegisterPage);
}

}

iniciar sesión

Correo
El campo es requerido.
Contraseña
El campo es requerido.


Siguiente

Registrarse

Olvidé mi contraseña

Lee nuestro aviso de privacidad

Any ideas?


#2

@abrahamstalin have you been able to solve this problem?