Using AngularJS you will be choosing and providing the variations within your Angular code. Google calls this browser-implementation only. So you do not use the standard experiment code snippet provided by the Google Analytics Web Interface. Instead you will be using the Content Experiment JavaScript API. So the script you'll be loading is:
<script src="//www.google-analytics.com/cx/api.js?experiment=EXPERIMENT_ID"></script>
If you're using ui-router:
As foxx already wrote you simply have to determine the variation by calling cxApi.chooseVariation()
every time the user is exposed to the $state
which you want to run the test on. You can either choose different templates in the $stateProvider.state()
call (as shown by foxx) or you can simply resolve the variation number and inject it into the controller, to use variation classes in the template: ng-class="{original: isVariation(0), variation-one: isVariation(1)}"
Google provides a great guide to implement experiments on the client-side.