What is the meaning of public mainCtrl: MainCtrl as a representative in ng4? Is it the grammar of es6? for the first time, 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

Mar.21,2021

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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38b0c-2b499.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38b0c-2b499.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?