title: AngularJS RzSlider: How do I default to, if rz-slider-model is undefined or null?
body: <p>I am using the <strong>Range Slider</strong> from <a href="https://github.com/rzajac/angularjs-slider" rel="nofollow">RzSlider</a> v2.0.1 in my application, where the <strong><em>rz-slider-model</em></strong> value can be either undefined or with an int value.</p>
  
  <p>Below is my HTML template</p>
  
  <pre><code>&lt;tr ng-repeat="feature in categories"&gt;
       &lt;td&gt;
        {{feature.featureName}}                                    
        &lt;rzslider rz-slider-model="feature.slider.selectedMin" rz-slider-high="feature.slider.selectedMax" rz-slider-options="{floor:feature.slider.min, ceil:feature.slider.max, onChange: editor.slideChange(categoryId,  feature.value, feature.slider.selectedMin, feature.slider.selectedMax)}"&gt;&lt;/rzslider&gt;
       &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>And the model value can be anything like these</p>
  
  <pre><code>[{
       "slider": {
           "min": 0,
           "max": 10,
           "selectedMin": 2,
           "selectedMax": 4
          },
         "value": "1",
         "featureName": "Fuel"
  },
  {
       "slider": {
           "max": 10,
           "selectedMin": null,
           "selectedMax": 5
          },
         "value": "2",
         "featureName": "Large"
  }]
  </code></pre>
  
  <p>Now, how can I default <code>rz-slider-model</code> value to <code>0</code> if my JSON object from API returns as <code>null</code>.</p>
  
  <p>I tried setting something like <code>rz-slider-model='feature.slider.selectedMin || 0'</code> but getting an exception while changing the slider value like <code>Error: [$compile:nonassign] Expression 'feature.slider.selectedMin || 0' used with directive 'rzslider' is non-assignable!</code></p>
  
  <p>You can find the sample code <a href="http://jsfiddle.net/Karthik9836/ed7cvfwc/" rel="nofollow">here</a></p>
  
  <p>Please help!</p>