How to lazy-load an Angular component from an html template?

I have an existing Angular app which eager-loads everything, and I would now like to add lazy-loading capabilities to it. Lazy-loading routes works fine, especially by following the guidelines provided by and, with the following routes construct in AppRoutingModule: {path: ‘dashboard’, loadChildren: () => import(‘./dashboard/dashboard.module’).then(m => m.DashboardModule)} Programmatically loading components is also doable […]

How to handle Safari iOS zoom on input fields

My responsive web app (made with Angular Material) works fine except with input fields on iOS / Safari: when the user focuses on an input field, iOS zooms the web page. Then the zoom level remains, breaking the responsiveness of the app (because then, the viewport becomes scrollable, and for instance the toolbar is no […]

By bfredo123
Categorized as angular, ios, mobile, safari, zoom-sdk Tagged , , , ,

How to inject Angular service for login in Cypress tests

I start using Cypress to test my Angular app. As recommended by Cypress, I would like to save testing time by bypassing the login screen upon each test, and directly invoke my Angular LoginService. I followed this example: as a basis (but it is not using Angular services). The thing is that: I have […]

How to ensure mat-select scrollbar visibility when some options are not visible

I am using a mat-select which has more mat-options that the default height can show. So there are some hidden options, and as the scroll bar is not visible until the user tries to scroll, he thinks there is no other options than the visible ones. How to make sure that the vertical scrollbar is […]

By bfredo123
Categorized as angular, css, html, scrollbar, select Tagged , , , ,

Angular Mat Paginator: how to prevent page change or page size change?

It looks like MatPaginator only notifies once such a change has been made by the user (PageEvent events). Is there also a way to reject a page change, or a change on the page size? It might be useful if some edits have been done on the page, and that – if the user tries […]

By bfredo123
Categorized as angular, angular-material, events, paginator Tagged , , ,

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