Blog

IDEAS AND EXAMPLES ABOUT COMMANGULAR

Version 0.8.0 Is Out.


A new Commangular version is out with a different way of creating command flows. The last implementation was poor and I have had some problems and limitations working with it, so I decided to improve the power of flows. Now you can create a command using an expresion that will be evaluated against the command context using the angular $parse service.

You can use angular services in the expresion or any result from a preceding command to create an expresion that has to return a boolean result type.

Before :

$commangularProvider.mapTo('TestEvent').asFlow().resultLink("result1",true).to('Command1');

$commangularProvider.mapTo('TestEvent').asFlow().serviceLink("UserModel","isAdmin",true).to('Command1');

Now :

$commangularProvider.mapTo('TestEvent').asFlow().link("result1 == true").to('Command1');

$commangularProvider.mapTo('TestEvent').asFlow().link("UserModel.isAdmin == true",'UserModel').to('Command1');

This is more powerfull and you will have more freedom to create flows. This is a breaking change, so any flow created on version < 0.8.0 won't work on versions >= 0.8.0.

You can see the new flows docs here

Back
comments powered by Disqus