Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rzSliderTplUrl should be marked as optional. #668

Open
mickdelaney opened this issue Apr 2, 2019 · 2 comments
Open

rzSliderTplUrl should be marked as optional. #668

mickdelaney opened this issue Apr 2, 2019 · 2 comments

Comments

@mickdelaney
Copy link

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

@ValentinH
Copy link
Member

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

@mickdelaney
Copy link
Author

Ok, leave it me with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants