Coder Social home page Coder Social logo

emartech / angular-phonecat-components Goto Github PK

View Code? Open in Web Editor NEW
26.0 8.0 2.0 3.14 MB

Component based AngularJS application example (Phonecat) in modern Javascript with Webpack

Home Page: https://emartech.github.io/angular-phonecat-components/

License: MIT License

JavaScript 66.59% HTML 30.07% CSS 3.34%

angular-phonecat-components's Introduction

Angular Phonecat Components

devDependency Status

Component based AngularJS application example (Phonecat) in modern Javascript with Webpack.

Introduction

The idea came from the original Angular Phonecat application to recreate it using modern tooling (using Angular 1.5 with components and new language features in ES6/ES7). It was first introduced in our workshop (source code) where we migrated the application to it's final stage what you can see in this repository.

This final stage is intended to show how close an Angular 1 application can be to Angular 2 in concepts and data flow.

For those not knowing the original repository, it is a phone listing application where you can filter the list on the main page and view detailed description on phones at the details page.

Technical details

It uses the latest Angular available (1.5) and many features from ES6 (imports, classes, let etc.). To make it work in browsers, the code is transpiled with Babel (latest preset) and bundled into single files with Webpack.

It consists of 3 different entry points.

  • client/app/main.js is the main entry point and holds the application logic
  • client/app/vendor.js is where the third party libraries reside like angular itself
  • client/app/styles.js consists of required stylesheets for the pretty display

For Http calls and data access only services are used. Components (introduced in Angular 1.5) access data through these services and pass down to child components if necessary.

Only one way data binding is used in combination with lifecycle events, data flows only up or downwards. Components don't use the scope or the root scope for any communication.

Components containing application specific business logic considered as smart components. Those without application specific logic, such as the select component, considered dumb components. More on this topic can be found in this article.

Getting started

git clone https://github.com/emartech/angular-phonecat-components.git
cd angular-phonecat-components
npm i
npm start

Now the application is running, open your browser and visit the link http://localhost:3000.

angular-phonecat-components's People

Contributors

sonicoder86 avatar szeist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.