GithubHelp home page GithubHelp logo

xmqywx / angular-flux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haffmaestro/angular-flux

0.0 2.0 0.0 249 KB

Experiment with using the Flux architecture in Angular

CSS 64.55% HTML 10.08% JavaScript 25.36%

angular-flux's Introduction

Angular with Flux Architecture

An attempt to try out the Flux architecture with Angular... check out demos/simple-todo/index.html & demos/simple-todo/todo-app.js for to see it in action.

angular-flux.js contains the pieces that you need to get going with the Flux architecture in Angular. Just download it and include it in your app with the module ngFlux. Install it through bower with bower install angular-flux-helpers --save.

  • FluxUtil packages a couple of functions to reduce boilerplate
  • FluxUtil.defineConstants defines constants for you.
  • FluxUtil.createDispatcher creates a dispatcher from Facebook's dispatcher.js prototype and adds a handleViewAction function to it.
  • FluxUtil.createStore creates an object based the node.js EventEmitter prototype, with a few useful helpers tacked on, such as bindState(scope, callback) that will add a change listener to the store and execute the callback on change - it also safely removes this listener when the scope is destroyed.
  • The localize-state directive creates a one way data binding, so changes propagate down but not up, allowing you to keep the data in sync with wider application changes while controlling when the local state triggers an action. This directive is not needed to propagate changes, normal angular data-binding works better.

Examples

todo-app.js and it will make sense if you're already familiar with the Flux architecture.

Flix is an Android app (based on the Ionic Framework) that uses angular-flux. See /frontend/www/js/

TODO

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.