Coder Social home page Coder Social logo

flatiron-director's Introduction

flatiron-director

flatiron-director is a web component for routing that wraps the flatiron director isomorphic URL router library.

Example

<flatiron-director route="{{route}}" auto-hash></flatiron-director>

flatiron-director's People

Contributors

adalinesimonian avatar addyosmani avatar dfreedm avatar ebidel avatar frankiefu avatar sorvell 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

flatiron-director's Issues

route not initializing to 'hello'

demo.html does this:

    Polymer('x-test', {
      route: 'hello'
    });

but the input box doesn't initialize to 'hello'.

If I change x-test to this:

    Polymer('x-test', {
      ready: function () {
          this.route = 'hello';
      }
    });

then the input box does initialize to 'hello'.

Assuming that route: 'hello' was meant to initialize, why doesn't it?

Initial slash does not show

I might be misusing the component, but it looks like <flatiron-director> doesn't show the initial slash after the hash. URL becomes http://localhost:9000/#myroute instead of http://localhost:9000/#/myroute.

Shouldn't this.ready be:

ready: function() {
  this.router.on(/(.*)/, function(route) {
    this.route = this.router.delimiter + route;
  }.bind(this));
  this.route = this.router.getRoute() ? this.router.delimiter + this.router.getRoute().join(this.router.delimiter): '';
}

?

tag 0.3.0 bower.json doesn't provide version

...therefore travis is unhappy...

  • polymer-jsonp no version
    An error was caught when reading the bower.json: no version
  • flatiron-director no version
    An error was caught when reading the bower.json: no version

Using a delimiter for multiple bindings

Flatiron is great and even better with Polymer!

Can anyone think of a way we can add the ability to use the delimiter option on the router and bind multiple properties?

I was thinking of adding an options attribute to pass in things like {"strict":false, "delimiter":"-"}, but there is still the matter of binding to router.on() for multiple objects.

I don't understand the use of regexes with flatiron well enough yet.

Revise to add a component page.

This current doesn't have a dedicated component page, unlike some of our other elements. If there's interest in putting one together I wouldn't mind doing that.

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.