I am new to TypeScript and I have seen examples of this to deal with injected objects and set it to a component property (this.anything)
First with the publication and manual installation of this.nav
export class XPTO {
constructor(public nav: NavController) {
this.nav = nav;
}
}
and this, with private
export class XPTO {
constructor(private nav: NavController) {
}
}
in both cases, after creating the this.nav object, it is a NavController object. What are the differences between both implementations? Or is it the same when compiled to plain javascript?
source
share