Adobe-Marketing-Cloud / target-atjs-extensions

Adobe Target extensions to at.js to support Single Page Application implementations
56 stars 29 forks source link

Target w/AngularJS - implemented but not "flicker free" #40

Open stephenmaguireland opened 6 years ago

stephenmaguireland commented 6 years ago

I have implemented up to date version of at.js on our site following instructions here for ngRoute. The implementation is working, I can load my page in the VEC and set up activities.

My issue is that when I run an activity, specifically an A/B test with URL Redirect, ALL of experience A loads before the target code runs and redirects the user to experience B.

I have attempted to move the target specific files up into the head however this causes errors in the application as it's kicking in before Angular is defined. Angular is, by default, loaded at the bottom of the page.

How can I implement so that the URL redirect kicks in before the page has loaded up? GIF attached showing current behaviour....

Thanks!

edit: I am using AngularJS v1.6.6

redirect