export class GoodsImgsComponent {
@ Input () data: any = [];
constructor (public mainCtrl: MainCtrl) {
}
}
Project see a lot of this usage first contact but do not understand what it means, Baidu does not know how to query, ask for advice
export class GoodsImgsComponent {
@ Input () data: any = [];
constructor (public mainCtrl: MainCtrl) {
}
}
Project see a lot of this usage first contact but do not understand what it means, Baidu does not know how to query, ask for advice
look at the official documentation of Angular, which introduces that dependency injection (DI), has a special section on this.
MainCtrl refers to a class you introduce. Public defines the properties of a variable, which is public, and mainCtrl is an instance of MainCtrl
.Previous: You can drag and drop the project source code that generates the background management system.
Next: Python's explanation of heterogeneous data,homogeneous items