Giter Site home page Giter Site logo

ui-router and slidr about slidr HOT 4 CLOSED

bchanx avatar bchanx commented on May 23, 2024
ui-router and slidr

from slidr.

Comments (4)

bchanx avatar bchanx commented on May 23, 2024

Seems strange, I don't believe angular would tamper with the styling. The thing that comes mind right now is if you're using any kind of templating logic (say, data-slidr={{ slidr-id }} ) and slidr.js is being called before the template $digest occurs, it will likely fail to create.

If you could recreate the issue on jsfiddle that'd be useful!

from slidr.

samuelecioni avatar samuelecioni commented on May 23, 2024

I have recreated the issue in this fiddle.
Try to navigate to the settings tab and see the slidr that works, than go to home, and again to the settings and the slidr is now broken.
http://jsfiddle.net/aFqS4/1/

from slidr.

bchanx avatar bchanx commented on May 23, 2024

Hey @Stelgard,

Didn't realize you edited your comment (Github doesn't push any notifications for edits whatsoever), next time it might be better to write a new comment instead!

The issue here is ui-router rewrites the entire template on every route change, and so the Slidr would get removed and reinserted back into the DOM stripped of its styling. slidr.js tries to be smart and forgoes creating a Slidr if it was previously created, but in this case it is the wrong behavior to take. I've added a fix for this in slidr v0.3.0, and the example now seems to be working.

http://jsfiddle.net/aFqS4/1/

Let me know if there's any other issues!

from slidr.

samuelecioni avatar samuelecioni commented on May 23, 2024

Now it's working; thanks!

from slidr.

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.