Closed xgrommx closed 9 years ago
This is line which contains my problem https://github.com/xgrommx/angular-bacon-bridge/blob/master/app/angular-bacon-bridge.js#L40
Depends what you want to be in the resulting stream:
$event
clicker()
(if the markup is like ng-click="clicker(123)"
null
)?Hello @phadej.
Sure your question is correct. I guess that better way for it should will be so:
Bacon should return to Next method arguments which I passed through callback function.
For example:
If my function has notation clicker(100)
then it should return 100 or if clicker($event)
it should return $event. Later I can change it with map
function.
Now I just return an empty array.
Also could you please explain to me how I can use Bacon.when or Bacon.update?
For example I have several events and I want that my another event has been executed when all events will executed. How can I use Bacon.update or Bacon.when?
I just do "$emit('eventname')" in ng-click, and attach an eventstream using $scope.$asEventStream, working great for me.
Hello @raimohanska
I just tried create bridge between AngularJS and BaconJS. I have some AngularJS module like a:
This work so: 1) We can use our click or another event function in angularjs directive like a:
2) In our controller we can use it like a:
This to work very well but I don't know what I should provide to
new Bacon.Next(???)
For example I just passed a static value like a empty array.
Do you have some advice for me?