Angularjs $anchorScroll.yOffset is not working for ng-sticky headers
<p>My project build on Angular Material, Angular JS and I am using ngSticky for sticking header below main header(which is a md-toolbar).</p>

<p>In the second header(sticky), there are bunch of button which should work as a link for scrolling to different section in same page.(Upon clicking the buttons, the page should scroll to respective section).</p>

<p>I used following code</p>

<p>Angular Controller </p>

<pre><code>$anchorScroll.yOffset = 100;  
$location.hash(anchor);
$anchorScroll();
</code></pre>

<p>HTML </p>

<pre><code>&lt;div sticky offset="65" media-query="min-width: 1000px" style="background-color:white; border-bottom: 1px solid #CFCFCF;"&gt;
    &lt;ng-include src="'XXX/XXX-buttons.html'"&gt;&lt;/ng-include&gt;
    &lt;div class="space-top-bottom"&gt;&lt;/div&gt;
    &lt;ng-include src="'XXX/XXX-links.html'"&gt;&lt;/ng-include&gt;
&lt;/div&gt;
</code></pre>

<p>Note that the links are under <code>'&lt;ng-include src="'XXX/XXX-links.html'"&gt;&lt;/ng-include&gt;'</code></p>

<p>Currently, page scrolls but not to correct position, it ignoring the sticky header height.</p>

<p>As per Angular JS <a href="https://docs.angularjs.org/api/ng/service/$anchorScroll" rel="nofollow">dos</a>, "In order for yOffset to work properly, scrolling should take place on the document's root and not some child element."</p>

<p>Expected behavior : Page should scroll to exact div id.</p>

<p>Problem :</p>

<blockquote>
  <p>Unable to add add offset to the scroll which compensate header(sticky) height.</p>
</blockquote>

<p>Help is appreciated.</p>