Question about provide/inject

There’s a parent component A,and child component B.

A: has a provide ‘ppp’
B: use this ppp like this

inject: [‘ppp’]

This will work.

Now I have another component C, and I’d like also put B inside C. then the inject will get an error as C does not have this ‘ppp’ provide.
The error in the console is:

injection ‘ppp’ not found.

I do need put B inside C, how should I get rid of this error? or I just ignore it?


added a default value null for ‘ppp’
inject : {
ppp: {
default: null,