SR
Size: a a a
SR
V
SR
DM
IN
V
provide () {
return {
some () { console.log(this) // текущий компонент }
other: () => { console.log(this) // компонент в котором заинжекчено }
}
}
V
schema.pre(‘save’, function () {
console.log(this) // Document
})
schema.pre(‘save’, () => {
console.log(this) // Query
})
V
V
DM
schema.pre(‘save’, (function () {
console.log(this) // Document
}).bind(this)
V
schema.pre(‘save’, (function () {
console.log(this) // Document
}).bind(this)
DM
V
DM
DM
V
DM
V
V
DM