public Countrows:Number; ngOnInit(): void { countitems() console.log("final count rows is" + this.Countrows); } countitems() { this._inventory.GetcountItems().subscribe( data =>this.Countrows=data[0].countItems ) } it give me final data undefined
[ { "countItems": 3 } ]
console.log("final data" + data[0].countItems) give me on console as final data 3
GetcountItems
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)