GithubHelp home page GithubHelp logo

ilovecomputers / angular-phonecat-components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from demisx/angular-phonecat-components

0.0 1.0 0.0 2.91 MB

This is a rewrite of angular tutorial app using components based organization structure

License: MIT License

CSS 11.52% JavaScript 65.49% Shell 22.98%

angular-phonecat-components's Introduction

AngularJS Phone Catalog Tutorial Application (Component-based)

This is a rewrite of the original phonecatApp tutorial app leveraging AngularAtom component-based organization structure. The 3 foundation blocks of the new organization are:

  1. Components
  2. UI states
  3. UI layout(s)

Components

This app has one feature component called phone and one special component called utils where global feature-agnostic helper services are placed.

UI states

Implemented via AngularUI Router the UI has only 3 states with the top level one being abstract:

1. 'phones'         // abstract state, can't be transitioned to
2. 'phones.list'    // UI shows a list of all phones
3. 'phones.detail'  // UI shows detail info on the selected phone

         |phones| // <-- abstract state that loads default layout
           /  \
          /    \
         /      \
      |list|  |detail| // <-- concete states that plug in their own content into the default layout

UI layouts

The app has just one simple layout with no header, footer or any other UI container, besides just the main content area. We describe this layout in layouts/default.html and load it in the abstract phones UI state.

Directory structure

[app-name]/ # application root directory
  |__app/   # container for all user-generated app code
  |   |__components/   # stateless feature components
  |   |__layouts/      # layout specific partials
  |   |__states/       # application UI states
  |__bower_components/ # 3rd party vendor client libraries global to the entire app
  |__config/           # app related configuration
  |__node_modules/     # 3rd party vendor node.js modules global to the entire app
  |__scripts/          # shell scripts
  |__test-e2e/         # e2e tests

Usage

# Start application
$ npm start

# Run unit tests
$ npm test

# Run e2e (end-to-end) tests
$ npm run protractor

Acknowledgments

Thank you:

  • @ilovecomputers for brainstorming emails and helping me with componentizing this app
  • @inazarov for trying out AngularAtom component-based organization on a real app and providing valuable feedback.

angular-phonecat-components's People

Contributors

demisx avatar ilovecomputers avatar

Watchers

 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.