angular-scroll
angular-scroll copied to clipboard
The `offset` attribute name collides with `angular-material`
Angular Material applies an offset-x class when it detects an offset="x" attribute on an element.
https://github.com/angular/material/issues/869
Both projects probably ought to namespace the use of attribute names.
Hi @pmowrer,
Have you tried using the duScrollOffset setting instead?
I have, but it only allows a single setting across the whole app.
On Thursday, November 19, 2015, Joel Arvidsson [email protected] wrote:
Hi @pmowrer https://github.com/pmowrer,
Have you tried using the duScrollOffset setting instead?
— Reply to this email directly or view it on GitHub https://github.com/oblador/angular-scroll/issues/158#issuecomment-158153817 .
Hi guys, I'm using angular-scroll with angular-material and faced the problem, when it only scrolls by x dimension but not 'y'. Do you know if that is related or I'm just missing some details?
Here is my simplified example:
<md-content flex du-scroll-container>
<div class='documents-cntainer'>
<div id='document1'><img></div>
<div id='document2'><img></div>
<div id='document3'><img></div>
</div>
<md-content>
then somewhere in the controller:
var someElement = angular.element(document.getElementById('document3'));
$document.scrollToElement(someElement, 30, 500);
As I sad it's only moves by x axis, but not y
Also I have to mention that <div id='document2'><img></div> has defined absolute position in css.
Ok, my fault I was calling scrollToElement method on $document, when it should be the container element.