Code Monkey home page Code Monkey logo

prouter's People

Contributors

boginw avatar dependabot[bot] avatar rogerpadilla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

prouter's Issues

support ie10/11

<script src="https://unpkg.com/prouter/prouter.min.js"></script>
    <script>
        const router = prouter.browserRouter();
        router
            .use('/abc', function (req, res) {
                alert(1);
            })
            .use('*', function (req, res) {
                alert(2);
            })
        router.listen();
    </script>

router.push('/abc')
returns 2

change router:
.use('/abc', ..) => .use('abc',..)
now it returns 1

Retaining scroll position from the previous page

Hi, โœ‹

I'm building a small PWA using a prouter. By reading the PWA checklist I saw that is a good practice to retain scroll position from the previous page when user presses back.

Imagine a list of a product, the user scroll to the bottom of the list, pick a product and go to the detail page. Then he goes back to the list. In this case, it's good to restore the scroll position.

It can be a nice to have feature in prouter. What do you think ?

.navigate doesn't scroll to top

When calling .navigate from a page where the user has scrolled down, the window will still be positioned where it was instead of going back to the top like normally happens when clicking links.

Instructions unclear and so on...

This may seem like a dumb issue but I can't seem to load prouter. I've tried regular script tags and requirejs, and failed miserably. According to readme.md either method should work.

The file I've been trying to load is dist/index.js as it's the only js file that isn't a configuration file. I must be doing something wrong but I have no idea what it is. Care to point me in the right direction (and amend readme.md so other dummies like me don't get stuck right away)? :)

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.