Skip to content

Conversation

icyc9
Copy link
Collaborator

@icyc9 icyc9 commented May 25, 2017

Implemented declarative micro-router that maps url fragments to templates.

@icyc9
Copy link
Collaborator Author

icyc9 commented May 27, 2017

@snuggs Any thoughts? I want to get this merged.

@icyc9 icyc9 requested a review from snuggs May 27, 2017 16:03
@snuggs
Copy link
Member

snuggs commented Jun 7, 2017

@Robertchristopher was away for the past week. Back at it again. Have added some commits to the branch. Will push later today.

@icyc9
Copy link
Collaborator Author

icyc9 commented Jun 11, 2017

@snuggs Can you push up your local commits? I want to see where your head is at. Need to get this merged soon.

@snuggs
Copy link
Member

snuggs commented Jun 12, 2017

Will do @Robertchristopher ! Please review #54

@snuggs
Copy link
Member

snuggs commented Jun 15, 2017

@Robertchristopher I FOUND IT! I forgot had this PR open. This is all we need for <hav-router> worked on this with @VicenteRD. #FACTS!

NYCrb/devpunks#19

@snuggs snuggs force-pushed the features/nav-router branch from 93faff5 to 3739a4d Compare June 19, 2017 16:06
@snuggs
Copy link
Member

snuggs commented Jun 19, 2017

@Robertchristopher rebased this branch. should be good to go now. I've done some interesting things with fragment identifier relative to the PR above. check out http://snuggsi.herokuapp.com and click nav links on the left for example. Seems like this feature should introduce a view attribute at minimum. Only CSS needed for that.

Also did not have to add the script files to the package.json bundle command. Can do that from within the component itself since the only thing bundled are the core snuggsi dependencies. (i.e. GlobalEventHandlers)

@snuggs snuggs changed the title features/nav-router features/nav-view Jun 19, 2017
@snuggs
Copy link
Member

snuggs commented Jun 19, 2017

@Robertchristopher @mrbernnz @brandondees @tmornini @btakita @albertoponti @robcole @misscs not too shabby a component this <nav-view>!

<link rel=import href=//snuggsi.es/nav-view>

<nav-view>
<!-- creates automagic links based on `view` discovery
  <a href=#home title='Used for title and link in nav-view'>Used for title and link in nav-view</a>
  <a href=#about title='About Us'>About Us</a>
  <a href=#contact title='Contact Us'>Contact Us</a>
-->
</nav-view>

<main view id=home role=main title='Used for title and link in nav-view'>
  <h1>Home Page</h1>

  <p>This is the home page</p>
</main>

<main hidden view id=about role=main title='About Us'>
  <h1>About Us</h1>

  <p>This is the about page</p>
</main>

<main hidden view id=contact role=main title='Contact Us'>
  <h1>Contact Us</h1>

  <p>This is the contact page</p>
</main>

Other use cases

Demo

gif

@snuggs snuggs merged commit d6e3a7e into master Jun 20, 2017
@snuggs snuggs deleted the features/nav-router branch June 20, 2017 02:58
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

Successfully merging this pull request may close these issues.

2 participants