The header is queried before angular appends the directive html to the dom, this could be circumvented with a quick check of the header var in the page scroll function and a re-query if necessary. like so:
header = header || document.querySelector( '.cbp-af-header' );
Not sure if this issue is common enough for you guys to make the change but if you'd like I could submit a pr with the fix, it would help me not have to re write the fix when I update :)