Questions tagged dom

Explore the latest questions and answers asked by our top developers.

how to do style a parent of a child using typescript

How to blur background when a button click? parent- class= "parent" child 1 – class = "child 1" child 2 – class = "child 2" I want to blur background when only click child 1 not child 2. How can i do blur background when clicking child 1 only using typescript? Source: Angular Questions

By hanushi
Published
Categorized as angular, css, dom, typescript Tagged , , ,

Reflow vs repaint with structural directives in angular?

Is my understanding correct when i say that structural directives cause reflow in DOM ( due to changes in layout and structure of DOM elements), whereas attribute directives cause repainting of the host element (due to change in particular attributes for the DOM element ) ? Source: Angular Questions

By Sruba Mohapatra
Published
Categorized as angular, dom Tagged ,

Don’t allow client to make Angular DOM changes

I have an Angular application. Right now, I can edit the elements by inspecting on chrome and can make the changes like removing disabled property and so on (I know [attr.disabled] is there but this is just an example). I have to achieve the functionality that the user should not make any changes on DOM […]

Web page is reloaded with a change in Angular project, but no reloading in React is needed

I’m learning both Angular and React. When I make a change in my code, if I’m in Angular project, the webpage gets refreshed and then the change is shown but in react without refreshing, the change is shown. Is it related to my type of coding or it is in basic of those frameworks? Source: […]

By Qiimiia
Published
Categorized as angular, dom, frameworks, reactjs Tagged , , ,

How to disable click event after element’s drag and drop in angular?

Actually I bind animation states on the element on which I applied CDKdrag and drop. It automatically triggers animation state when an element is dropped. How to disable animation on drop? How to differentiate animation click event and drop element event codes—– typescript: //animation trigger("changebarChartSize",[ state("ZoomBarChart", style({ transform: "scaleX(1.7) scaleY(1.3) translate(335px,60px)", border: "2px solid grey", […]

Why the code written in asyn ngOnInit() takes effect only after refreshing the component but not right after the login?

New to angular, doing multiple things. Today I had been assigned a task to read a webApi that returns a single value i.e. an active property. After reading, inject the add a class to classList of the body element i.e. ‘activeClass‘. The WebApi returns a promise from the myservices.service.ts and I am calling it from […]

Reset in gridstack.js ( Angular 2+) persists old values of HTML attributes causing issues while next resize or drag

I am using gridstack.js v^4.2.5 for my angular 7 application. I am able generate grid by in GridstackDemoComponent.ts grid: GridStack; ngOnInit() { this.grid = GridStack.init(); } and in <div class="grid-stack"> <div class="grid-stack-item" gs-id="grid-1" id="grid-1" > SOME DATA HERE/CHART COMPONENTS </div> </div> I have 6 such grid items for 6 different charts.This works perfectly fine. Now […]

Angular 7 add innerHTML dynamically binding

I am trying to set up a system which loads the html page from a stored html file and renders it with angular. How to bind attribute and event in this file, I’m trying to inject it with innerHTML. ParentComponent.ts genericAttribut ="Hello" getHtmlContent(){ id =1; this.service.getHtmlContent(id).subscribe((data)=> myTemplate =data; }); } genericFunction(){ console.log("fire"); } ParentComponent.html <div […]

By Melek Damak
Published
Categorized as angular, dom, html, javascript, typescript Tagged , , , ,

uncaught typeerror: cannot read property ‘classlist’ of null, when I scroll the page with sticky navbar

This is what I’m really getting in the browser console. zone-evergreen.js:182 Uncaught TypeError: Cannot read property ‘classList’ of null at o.r._activate (bootstrap.bundle.min.js:6) at o.r._process (bootstrap.bundle.min.js:6) at bootstrap.bundle.min.js:6 at n (bootstrap.bundle.min.js:6) at ZoneDelegate.invokeTask (zone-evergreen.js:406) at Zone.runTask (zone-evergreen.js:178) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:487) at invokeTask (zone-evergreen.js:1600) at globalZoneAwareCallback (zone-evergreen.js:1637) This is my code of making my navbar […]

By Hozefa Siyamwala
Published
Categorized as angular, dom, javascript, typeerror Tagged , , ,

Dom-to-image printing only first chart ionic 4

I have an Ionic page (page 2) that receives an id number, start date and end date from the previous page (page 1), sends a JSON to the API and receives two arrays: one for dates and one for measurements. Then, the arrays are put in a graph and shown. When the user clicks the […]

1 2 3 12

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq