Giter Club home page Giter Club logo

angular-camera-view's Introduction

Angular Camera View

In this assignment, you will use Angular built-in directives and filters as well as create your own filters to build a simple shopping page for cameras.

Example in action

Camera Shop Example

Example Data

Here is the data that will be used. It is included in the ng-init directive for you.

[
  {
    id: 1,
    name: 'Nikon D3100 DSLR',
    image: 'http://ecx.images-amazon.com/images/I/713u2gDQqML._SX522_.jpg',
    rating: 4,
    price: 369.99,
    onSale: true
  },
  {
    id: 2,
    name: 'Canon EOS 70D',
    image: 'http://ecx.images-amazon.com/images/I/81U00AkAUWL._SX522_.jpg',
    rating: 2,
    price: 1099.0,
    onSale: false
  },
  {
    id: 3,
    name: 'Nikon D810A',
    image:'http://ecx.images-amazon.com/images/I/91wtXIfLl2L._SX522_.jpg',
    rating: 3,
    price: 3796.95,
    onSale: true
  }
]

Part 1 - Requirements

The camera shop page will require the following:

  1. Display of the data in some format.
  2. The price is formatted into a currency
  3. The words "On SALE!" (or some form) are used when onSale is true
  4. The ability to sort by name or rating (default is name)
  5. The ability to search to filter the results (keeping the same order).
  6. A custom filter to handle the conversion of the rating from a number to asterisks. It is assumed that the rating will be an integer.

Part 2 - Requirements

The goal of part 2 is to add controllers to the exercise implementing a cart functionality.

Camera Shop Example Part 2

  1. Create two controllers, one to manage the cart, and one to manage the catalog of items.
  2. Remove all instances of ng-init and initialize any data into the controller. Ensure all ng-model variables are managed in a controller.
  3. When the user clicks "Add to Cart", the cart manages the item inserted. Subsequent adds increase the quantity of the item.
  4. User can remove an item from the cart by clicking on a button (it will remove the entire quantity of that item).
  5. The subtotal, tax, and total are calculated in place.

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.