5
Because in Angular we use interrogation, for example:
*ngIf="listaxpto?.clientes.length"
5
Because in Angular we use interrogation, for example:
*ngIf="listaxpto?.clientes.length"
14
The ?
is a operator Angular protecting property against null and undefined values.
In your case, without the use of the operator and the object listaxpto
being null
would be released an exception
Typeerror: Cannot read Property 'clients' of null.
but in some cases it is necessary to start the property with value null
Browser other questions tagged angular
You are not signed in. Login or sign up in order to post.