Topic: multi-item carousel button position
She Jong Shon free asked 6 years ago
Damian Gemza staff answered 6 years ago
Dear She Jong Shon,
You could try to use the below approach. Just insert your multi-item carousel in .col-md-10 div, and use the below typescript code:
.ts:
Best Regards,
Damian
constructor(private renderer: Renderer2) { } ngAfterViewInit() { letcontrols=document.querySelector('.controls-top'); this.renderer.setStyle(controls.children[0], 'position', 'absolute'); this.renderer.setStyle(controls.children[0], 'top', '50%'); this.renderer.setStyle(controls.children[0], 'right', '100%'); this.renderer.setStyle(controls.children[1], 'position', 'absolute'); this.renderer.setStyle(controls.children[1], 'top', '50%'); this.renderer.setStyle(controls.children[1], 'left', '100%'); }
She Jong Shon free commented 6 years ago
ERROR TypeError: Cannot read property 'children' of null
let controls=document.querySelector('.controls-top');
console.log(controls)
controls is null. Did you try on your end too?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 6.2.3
- Device: desktop
- Browser: chrome
- OS: windows 10
- Provided sample code: No
- Provided link: Yes
Tags