I need to test this, but I’m new testing and I do not have idea, I’m working with angular, I just want to test the close function and maybe if it renders. This is the html. And this is the modal.component.ts Answer In order to test if EventEmitter emits an event when clicking on background div, you should write a
Tag: angular
Could not import js file into component.ts
Hello I developped an angular 12 app. I imported js to each component in the previous app on angular 9 like this : js file: component.ts file: and it worked very well but in the angular 12 app it doesn’t anymore and returns me this error: Could not find a declaration file for module ‘src/assets/js/file.js’. ‘c:/Users/…/src/assets/js/file.js’ implicitly has an ‘any’
angular can not get user data form sessionstorage
sorry about my english. I use sessionstorage for keeping data. In sessionstorage have data enter image description here but in html, not showing data form sessionstorage. when I get only {{currentUser}} in html show like this enter image description here mycode services html and component how i can do to use please help me this image for {{ currentUser|json}} {{
Capturing product impression without making the website slow
I am working on a website where we have thousands of products. I have to capture the impression of all products users can see in their viewport. So I created a directory and I used IntersectionObserver, and referred to it inside the HTML code of that product. The issue is that it’s causing a performing impact on the mobile site
Angular: conditionally render based on whether value was received from Firebase DB
I have a component: export class MainpageComponent implements OnInit { items: Observable
How to implement @HostListener(‘window:beforeunload’, [‘$event’]) into canDeactivate guard directives?
In my app, we have lots of components with lots of form fields. So whenever the user changes something in the form and without saving the changes if the user wants to navigate to another component he …
Disable Weekends on ng2-date-picker
I am looking for a function that can disable weekends on my datepicker. I know that I can use isDayDisabledCallback to disable dates but how can I only disable weekends.
Send formArray as one object
I am using mat-stepper single form for my stepper. when i do API call it sends data as an array of objects like this: [ { “product”: “lifeci”, “gender”: &…
understanding ngrx and the initalState
i’m working with ngrx. i’ve created a state like this: export interface Bonus110State { agent: Agent; isEdited: boolean; isResetted: boolean; steps: Step[]; response: ResponseReport; …
How to implement sign in with Google in Angular?
I need to implement a sign in with google feature on a website. The problem is that I can’t find a library for Angular (11), for example React has one. Even if there isn’t a library for angular, I can’…