Hi.
All other plugins are working fine - but ScrollSmoother refuses to work within the Angular project I'm working on. I've tried to use custom wrapper
+ content, I've tried to move the wrapper + content inside the actual component to test it out to see if it would work *at all*, but no luck.
I'm not sure what I'm doing wrong. I am receiving no error message - but as shown in the ///routed-content HTML, I have the attributes for each
item set, but they all move together in unison.
I am really needing some help here as I can't quite figure out why ScrollSmoother won't work and I don't want to animate parallax enter/exit
via ScrollTrigger, but I may have to resort to that since I don't even know where to begin with getting ScrollSmoother to work.
I've seen all examples of ScrollSmoother and read through the forum, and I've seen examples where ScrollSmoother works within nested divs -
Please help here!
gsap.registerPlugin(DrawSVGPlugin, SplitText, TextPlugin, ScrollTrigger, ScrambleTextPlugin, ScrollSmoother);
this.smoother = ScrollSmoother.create({
content: "#smooth-content",
wrapper: "#smooth-wrapper",
smooth: 2,
effects: true,
normalizeScroll: true,
ignoreMobileResize: true,
});
////index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<div id="smooth-wrapper">
<div id="smooth-content">
<app-root>
//routed content appears here.
</app-root>
</div>
</div>
</body>
</html>
////routed-content
<h1 data-speed="auto">
Build.
</h1>
<h1 data-speed="0.5">
Deploy.
</h1>
<h1 data-speed="0.3">
Repeat.
</h1>