Giter Site home page Giter Site logo

Comments (7)

henrahmagix avatar henrahmagix commented on August 15, 2024

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.

bertop89 avatar bertop89 commented on August 15, 2024

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.

henrahmagix avatar henrahmagix commented on August 15, 2024

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.

bertop89 avatar bertop89 commented on August 15, 2024

I see, thank you again for your thorough explanation!

from angular-slider.

henrahmagix avatar henrahmagix commented on August 15, 2024

You're welcome =)

from angular-slider.

renanlecaro avatar renanlecaro commented on August 15, 2024

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.

drgould avatar drgould commented on August 15, 2024

Yeah, I'll try to make it more explicit in the readme.

from angular-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.