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

Router specific language features. #2

Open
ThePrimeagen opened this issue Apr 21, 2015 · 0 comments
Open

Router specific language features. #2

ThePrimeagen opened this issue Apr 21, 2015 · 0 comments
Assignees
Milestone

Comments

@ThePrimeagen
Copy link
Contributor

Router specific language support for the path syntax.

This really depends on how the functions will be executed.

{
    // Here is an example of the path syntax.
    route: 'titles[{integers}].name',
    get: function(route) {
        var ids = route[1];
        ...
    },

    // Another possible approach where we allow for named syntax.
    route: 'titles[{integers:ids}].name',
    get: function(route) {
        var ids = route.ids;
        ...
    },

    // another possible answer by applying the arguments.
    // this could be weird with set | call
    route: 'titles[{integers}].name',
    get: function(titles, ids, name|) {
        ...
    }
}

So before finishing this feature, moving forward with style is needed.

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

No branches or pull requests

2 participants