when i need to access to this ,
but i found problem to give the value true to this.idHiden
like : this.idHiden = true the error :
TypeError: Cannot set property 'idHiden' of null
and the code
import { Component , Output} from '@angular/core' ;
import { NgForm } from '@angular/forms';
import * as Datastore from 'nedb';
@Component({
moduleId : module.id ,
providers: [ ],
templateUrl : 'info.component.html'
})
export class InfoComponent {
selkName : any ;
insertedSelk : any ;
idHiden : false ;
selkValidate : number ;
constructor(){
this.selkName = '' ;
this.insertedSelk = [] ;
this.selkValidate = 1 ;
this.SelkFinde(this) ;
}
DeletSelk(id:number ){
let db = new Datastore({filename : 'ComerceDB'});
db.loadDatabase(function() {
db.remove({ _id: id }, {}, function (err:any, numRemoved:any) {
this.idHiden = true
console.log(this.idHiden) ;
});
});
}
}