Giter Club home page Giter Club logo

angular-router's Introduction

angular-router

angular2 routing sample demo I've creating to share

This project came from the Angular 2 Routing page in my tuts-plus repo.

https://angular.io/docs/ts/latest/tutorial/

I am trying to better understanding routing in ng2 with components, rather than the old way we did it in Angular 1x world.

Ok, so I had the components spread out among folders for hero, hero-details, dashboard, etc... and it was getting to messy and I need to get through the routing part. So I moved everything back to the app-root, and reset the path in the files. DONE

Next steps... move the files slowly back out to component folders, OR just learn how to use the CLI to create these in the first place.

  • Added the Angular router to navigate among different components.
  • Learned how to create router links to represent navigation menu items.
  • Used router link parameters to navigate to the details of the user-selected hero.
  • Shared the HeroService among multiple components.
  • Moved HTML and CSS out of the component file and into their own files.
  • Added the uppercase pipe to format data.

So one more step is the remote data access.

  • Replace the mock data with data retrieved from a server using http.
  • "the HTTP client will fetch and save data from a mock service, the in-memory web API".
  • Recreate this whole project with CLI, using routes and components in the first place.

One second thought, I might also go check out the thinkster site that matches several different front-ends with several different back-ends via a common API.

All in all not a bad day. Mind straining as the tutorial style was not helpful.

angular-router's People

Contributors

gokemon avatar

Watchers

James Cloos avatar  avatar  avatar

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.