Giter Club home page Giter Club logo

color-me-angular's Introduction

Color Me Angular

Learn ngRoute with colors.

This lab uses 148 Built-In CSS Color Names.

screenshot of colors/index buttons

The Challenge

Your goal is to create an angular front-end that displays information about css colors:

  • When a user navigates to /, they should see a list of all 148 css colors.
  • When a user navigates to /colors/33, they should see information about hexadecimal color #6495ED, otherwise known as "CornFlowerBlue" (see the hard-coded list of COLORS in app.js).
  • Color names should link to their approriate show page.
  • The colors/show.html should have a convenient "Back" button that returns the user to the home page.
screenshot of colors#show

Setup

Clone this repo.

We will be using a new development server called budo for this project.

npm install -g budo

Run the server:

budo -P --host=localhost --open

Bonuses

Semantic Routes: Create separate routes for /color/name/:name and color/hex/:hex, but have them display the same show page. * Since there are only 148 named colors in css, and 16^6 (16,777,216) hex colors, not every show page can have a color name in the title. Can you accomodate for this?

Hint: *How do you find the color by `name` or `hex`?* (Click Here) ```js var target_number = 2; var foundObj = [{num:7},{num:2}].find(function(o){ return o.num === target_number; }) ```

Color Picker: Add an HTML5 colorpicker (input type 'color') to colors/show.html.

  • Set its initial value to the hex value of the show page.
  • Stretch: when the user changes their color selection, redirect them to the appropriate show page.

Sort the Colors: Add a filter to colors/index.html that sorts colors by name, alphabetically.

  • Next, add a button to the index page that, on click...
    • sorts colors by name.
    • sorts colors by hex.
    • Stretchy Stretch: toggles between ascending/descending sort order with every click.

Resources

color-me-angular's People

Contributors

nathanallen avatar

Watchers

Dan Kingdon 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.