ngx-scrollreveal
ngx-scrollreveal copied to clipboard
Remove unclear comment regarding unnecessary provider
Comment leads user to believe that adding NgsRevealConfig as a provider was necessary.
Coverage remained the same at 95.918% when pulling 74ce11d0bb565751a2a5922222126532b5e41226 on huckpilot:patch-1 into e366587774b313a13ac6ab1f19ea9c33ae6ba475 on tinesoft:master.
Hi @huckpilot ,
Adding NgsRevealConfig to providers list of the component IS necessary when you want to customize the settings for that component and its children. Of course, if you don't need any global customization, there is no need. That why this part is in a different section of the README.
What do you find misleading or unclear in the docs?
@tinesoft Thanks for the reply!
This may be an issue on my part.
my app.compoment.ts file:
import { NgsRevealConfig } from 'ng-scrollreveal';
...
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
providers: [ContentfulService, NgsRevealConfig],
...
constructor(
private config: NgsRevealConfig
...
config.scale = 1;
config.opacity = 0;
config.reset = true;
When I add NgsRevealConfig to my component provider, the global config values are not recognized site wide. However when I remove NgsRevealConfig from my component provider, the scroll reveal global config values are functioning.