p1 = geometry.paths;
p2 = geometry.paths;
var rise = p2 - p1;
var run = p2 - p1;
angle = (180/Math.PI) * Math.atan2(run, rise);
I know this is super old, but I came across this post while looking for a similar solution, so sharing my eventual solution here. Ended up building a custom line symbol to handle this. It's on github here:
nickcam/DirectionalLineSymbol · GitHub
Might help some others stumbling across this in the near future.
Retrieving data ...