adrdilauro/angular-ab-tests

Manually set the version

herzinger opened this issue · 4 comments

Hi, thanks for the lib, it's really simple and effective, so I like it a lot.

That being said, I would like to avoid at least my authenticated users to see different versions across devices, by making an association with the user's registry in the backend of my application. That would be simple to achieve if I could change the version manually after the authentication process.

I figure this would also be useful in some cases where we would allow the user to toggle between versions themselves, like what Google products usually do (with "go back to old version" type links in Gmail and others).

I intend to tackle this issue myself (and I'll be happy to make a pull request if there's any interest), but any advice would be nice. Is there anything I need to keep in mind to expose some sort of setter method in the service?

Hi, thank you for the issue. Unfortunately I am travelling at the moment, with little or no internet, and no laptop, so I cannot help you right now.

I'll be back in the second half of December. If you want you can fork the repository, then when I am back I review your changes and apply them to the original repo, and then you can replace it seamlessly in your project.

Sorry for the disruption, I intend to maintain this project as soon as I am back. I don't usually spend so much time away like now, in normal circumstances I am happy to modify the module immediately.

I think the addition you are proposing should be quite simple btw

Hi @herzinger,

This is the change: 22afefa

I am re-building the module, updating dependencies and documentation; it will be available in a few hours

Oh, thanks. The project I'm working in moved on from AB tests for the time, so I didn't pursue this yet, but that's exactly what I needed, and I'm sure I'll be using this project soon.