Code Monkey home page Code Monkey logo

angular-state-machine's People

Contributors

bitdeli-chef avatar giacomoburattini avatar tafax 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

angular-state-machine's Issues

Example of JSON config

Thanks for making this available. Would you have an example of what the JSON config should look like? Or any samples at all... Thanks again!!

Adding the promise handling

We need to add the ability to use promise as action response. We want the state machine can change state invoking send in the nested way or in the sequential one.

Nested invoke

stateMachine.send('message').then(function() {
    stateMachine.send('another message').then(function() {
        ....
    });
});

Sequential invoke

stateMachine.send('message').then(function() {
    ....
});
stateMachine.send('another message').then(function() {
    ....
});

The two strategies should produce the same result.

TypeError: stateMachineProvider.setConfig is not a function

Hi, I'm trying to use your code to make a configuration state machine, but doesn't work..

When I call the method "setConfig" from stateMachineProvider, is it make this error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module BssJS due to:
TypeError: stateMachineProvider.setConfig is not a function
at file:///C:/Desenvolvimento/workspace/BSSJs/scripts/app.js:4:24
at Object.invoke (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:4478:17)
at runInvokeQueue (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:4384:35)
at file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:4393:11
at forEach (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:336:20)
at loadModules (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:4374:5)
at createInjector (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:4299:11)
at doBootstrap (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:1657:20)
at bootstrap (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:1678:12)
at angularInit (file:///C:/Desenvolvimento/workspace/BSSJs/libs/angular.js:1572:5)
http://errors.angularjs.org/1.4.7/$injector/modulerr?p0=BssJS&p1=TypeError%…FC%3A%2FDesenvolvimento%2Fworkspace%2FBSSJs%2Flibs%2Fangular.js%3A1572%3A5)

Using his example the same error occurs..

Here is my code:

angular.module('BssJS', ['FSM']);
angular.module('BssJS').config(function(stateMachineProvider){
console.log(stateMachineProvider);
stateMachineProvider.setConfig({});
});

In javascript console, the object stateMachineProvider do not have the setConfig method. Can you help-me ?

Sorry for my english, I'm not good :(

For use within a controller?

This looks like some neat code. I'm wanting to use an FSM to handle conditional UI. It's for a filter interface in which I only want to allow the filter button to be clicked when one of the filter parameters changes and when all of the filter parameters are valid. It's actually quite a complex little task.

This project looks like it might help. Although, from what I can gather this is to control an entire app? It's not suitable for just within a controller for example?

Are you going to migrate it to Angular2?

I just want to say that I find this library really useful and I was wondering if it's the case.
It helps me a lot on some personal projects :)
Keep the good work!

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.