skip to Main Content

Javascript – needs to select at least one form-control in the set of form-controls

I have form like below : this.configGroup = new FormGroup({ accountOne: new FormControl(null), accountTwo: new FormControl(null), prefix: new FormControl(""), suffix: new FormControl(""), critical: new FormControl(null), medium: new FormControl(null), low: new FormControl(null), none: new FormControl(null) }); HTML code : <div class="cred-ref-id-wrap">…

VIEW QUESTION

Css – Change header background color on scroll

Need help changing my header background color when scrolling. This is what i have thus far. header.component.ts export class HeaderComponent { ngOnInit(): void { const header = document.querySelector('.header'); document.addEventListener('scroll', (ev) => { if (header !== null) { if (window.scrollY ===…

VIEW QUESTION

Generate file object from content using javascript

I have this file data const ics = 'BEGIN:VCALENDARn' + 'VERSION:2.0n' + 'CALSCALE:GREGORIANn' + 'METHOD:PUBLISHn' + 'END:VCALENDARn'; i want to generate file object where fileBody is ics data convert(fileBody,filename) { let fileContent=this.dataURLtoFile('data:text/plain;charset=utf-8,' + encodeURIComponent(fileBody),filename); } dataURLtoFile(dataurl, filename) { console.log('dataurl',dataurl); var…

VIEW QUESTION
Back To Top
Search