javascript objects - Can someone explain what is the operator ":?"? -


can explain operator?

 @observable.ref navigationstate: ?navigationstate = null; 

it's safe navigation operator", i.e. x?.y.

for refrence go here

or take example

  <md-select placeholder="select month" [(ngmodel)]="monthselected"    #userselect>    <md-option *ngfor="let userselection of calandercontent"    [value]="userselection">   {{ userselection.month }}   </md-option>   </md-select>   {{userselect.selected.value.days}} <- compile time error beacuse didnt selected                                           options @ time of initializing.   {{userselect.selected?.value?.days}} <- correct because waits if selected                                            , displays value                                                

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -