Comments (7)
There are many attributes that don't get parsed as an angular expression: floor
and ceiling
are such attributes. The others can be seen here.
Not being parsed as an angular expression means you need to use {{ }}
to get the value from an angular variable, like so:
<slider ng-model="sliderModel" floor="{{ floorValue }}" ceiling="100">
where sliderModel
and floorValue
are angular variables, and 100
is a string representing an integer.
from angular-slider.
Thanks for the quick response! That was what I was trying but it was not working. Found out it was a conflict with the twig templating syntax which uses the brackets also for its controllers.
Just out of curiosity, how do you guys decide which attributes get parsed as an angular expression and which not?
from angular-slider.
When setting up the attributes one wants from a directive, they can be set to =
(angular parsing), @
(no parsing), or &
(use parent scope). This is decided on the directive.
Often you will get parsing errors when trying to pass a value of 100
to an =
attribute, which is why this library is setup to allow values to be placed straight into the config attributes: so you can write floor="0" ceiling="100"
without having to resort to setting variables on the scope.
from angular-slider.
I see, thank you again for your thorough explanation!
from angular-slider.
You're welcome =)
from angular-slider.
I was having the same problem, maybe that's worth putting in the readme file ?
Thanks a lot for this module anyway, it's extremely usefull for our class projet :)
from angular-slider.
Yeah, I'll try to make it more explicit in the readme.
from angular-slider.
Related Issues (20)
- Different styles for the pointers
- Bump angular dep to ~1.3 HOT 4
- function stepBubbles() missing from code HOT 2
- Style selected area of a single know slider HOT 1
- Extra label functionality HOT 4
- bubble.ceiling will not position correctly if parent DOM element uses a CSS transition on width
- low and high knobs coincide
- No Working on mobile HOT 4
- Max difference attribute?
- bind to a input box, cannot change the value HOT 2
- IE11 memory leak HOT 1
- Avoid very slow performance?
- Is this still active?
- Assignable ceil and floor
- Slider knob not moving with keyboard controls
- Where is the demo? HOT 7
- no demo and no CSS files
- Can be used in the 1.4.7 version of the angular
- npm publish ? HOT 1
- slider failed at display elements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-slider.