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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -