angularjs-slider icon indicating copy to clipboard operation
angularjs-slider copied to clipboard

rzSliderTplUrl should be marked as optional.

Open mickdelaney opened this issue 6 years ago • 2 comments

Steps to reproduce

  1. Turn on strict Component Bindings $compileProvider.strictComponentBindingsEnabled(true);
  2. Render an rzslider without setting the rzSliderTplUrl
<rzslider
   rz-slider-model="$ctrl.sliderModel"
   rz-slider-options="$ctrl.sliderOptions">
</rzslider>

Error: [$compile:missingattr] Attribute 'rzSliderTplUrl' of 'rzslider' is non-optional and must be set! https://errors.angularjs.org/1.7.5/$compile/missingattr?p0=rzSliderTplUrl&p1=rzslider at angular.js:138 at strictBindingsCheck (angular.js:11243) at initializeBinding (angular.js:11266) at forEach (angular.js:395) at initializeDirectiveBindings (angular.js:11255) at nodeLinkFn (angular.js:10472) at angular.js:10900 at processQueue (angular.js:17914) at angular.js:17962 at Scope.$digest (angular.js:19075)

Expected behaviour

Tell us what should happen Given the value is actually optional (there's a default value of 'rzSliderTpl.html' It should be marked as @? (optional)

Actual behaviour

Its not optional

mickdelaney avatar Apr 02 '19 10:04 mickdelaney

Hi, I didn't know about strictComponentBindingsEnabled. Would you like to submit a PR fixing this?

ValentinH avatar Apr 02 '19 13:04 ValentinH

Ok, leave it me with.

mickdelaney avatar Apr 03 '19 08:04 mickdelaney