StickyContent not working for Angular


Topic: StickyContent not working for Angular

josh.novak pro asked a year ago

I cannot get the StickyContent to work for my site at all with the Angular version. I'm using the latest version (7.1.0). It would help if the docs went into more detail about requirements for it to work (does it need a certain container etc) and it would be great if there was a demo or something.

Joao pro answered a year ago

Hi @josh.novak.

I was having some issues implementing the sticky directive myself. I wanted to get  a card to stick on the right side column of a row once the window reach it.  The way I got it to work was something like this:

<div class="row">

  <div class="col-8">



 <div class="col-4">

     <div #cartStickySpacer ></div>
       <div mdbSticky sticky-after="#cartStickySpacer">

       <div class="card">


Also the documentation was not very clear on this but since I was importing individual components & modules on my app instead of the full mdb module I had to add "StickyContentModule" to my imports on the parent module.

Let me know if this works out for you




fodxp pro answered a year ago

All - one way to provide sourcecode to mdb support -

1. create a new angular app

2. reproduce the problem in the app.component.html

3. create a zip (minus the node_modules folder). 

4. Upload it to google drive and share it with mdb-support

Ideally, we'd expect the mdb-support team to do this.. but this is what I have been doing to get my problem debugged and solved quickly;


We will update our documentation with new examples.

Please provide more information on the problems you encountered when using mdbSticky.



josh.novak pro answered a year ago

I'd like to provide some more information, but I can't because you guys didn't give enough info. I did what your docs said, which was add the "mdbSticky" directive to the element. It does nothing. I'm not sure if it's because it's nested, or if I have to do other things for it to work. I'm importing everything too, so that shouldn't be an issue.

My import line:

import { MDBBootstrapModulesPro, MDBSpinningPreloader } from 'ng-uikit-pro-standard';

Damian Gemza staff answered a year ago

Dear @josh.novak 

Could you please provide me with the code which you're using in your application? I would like to debug your problem with my application.

Without the code, I won't be able to help you well.

Best Regards,


Please insert min. 20 characters.


Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: Angular
  • MDB Version: 7.0.0
  • Device: Mac
  • Browser: Chrome
  • OS: Mac
  • Provided sample code: No
  • Provided link: No