Rehmaanali

Rehmaanali

Founder Of Geekstrick. Full-Time Software Developer, Expertise in Frontend Development. Conversant with - Angular, React, NodeJS, and MongoDB, MySQL, Postgres,HTML+CSS+JS, CypressIO.

What is the difference between async and defer in JavaScript

geekstrick on September 24, 2020 🔥 0 views

What is the difference between async and defer in JavaScript? While we import the javascript file using script tag we use async or defer or just normal script tags what is the difference. // Normal Include <script src=”demo.js”></script> // Defer Include <script src=”demo.js” defer></script> // Async Include <script src=”demo.js” async></script>

discussion

Answer for How to merge two object and returned combined object using javascript

geekstrick on September 24, 2020 🔥 0 views

For Merging two different object you can do this /** * Merge Two objects and return combined object */ merge = (target, source) => { // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties for (const key of Object.keys(source)) { if (source[key] instanceof Object) { if […]

discussion

Best Way To Pass Data From Routes To Components In Angular 10

geekstrick on September 23, 2020 🔥 118617 views

In this tutorial, we will see what are the different ways to Pass Data From Routes To Components In Angular 10. In other words like sending data from anchor tags or routing module files of angular other than query params. Pass Data From Routes (Static Data) For passing the static data (via the routing module) […]

post

Answer for How to write unit test cases for private function of component in angular 9

geekstrick on September 22, 2020 🔥 0 views

Yes, it is possible to write unit test cases for the private function of the component. for your method, it will be tested as beforeEach(() => { fixture = TestBed.createComponent(AuthContainerComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it(‘should go to error field’, () => { // arrange … // act (component as any).scrollToFirstInvalidControl(); //assert …. });

discussion

Answer for How to scroll to top in angular 9

geekstrick on September 21, 2020 🔥 0 views

You can add configuration for scroll to top when ever route is change using property scrollPositionRestoration: ‘enabled’ @NgModule({ imports: [RouterModule.forRoot(routes, { scrollPositionRestoration: ‘enabled’ } )], exports: [RouterModule] })

discussion

Answer for ng new throws error The Schematic workflow failed. See above

geekstrick on September 21, 2020 🔥 0 views

npm cache clean –force npm i -g @angular/cli has fixed the issue for me.

discussion

Answer for what are difference between settimeout, setimmediate and setinterval ?

geekstrick on September 21, 2020 🔥 0 views

setTimeout setTimeout allows us to run a function once after the interval of time. In short, the method will be invoked only once after a defined delay time.   setInterval setInterval allows us to run a function repeatedly, starting after the interval of time, then repeating continuously at that interval. In short, the method will […]

discussion

New Feature In TypeScript 4.1 Beta Version

geekstrick on September 20, 2020 🔥 2237 views

Microsoft has announced that New Features in TypeScript 4.1 beta version also new checking flags and speed improvements. Release Date : 18 September, 2020 Release Notes : https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript Command to Install: npm install typescript@beta New Feature In TypeScript Template Literal Types Key Remapping in Mapped Types Recursive Conditional Types –noUncheckedIndexedAccess paths without baseUrl checkJs Implies […]

news

06 – Publish Angular Library To Public NPM Repository

geekstrick on September 18, 2020 🔥 3890 views
lesson

05 – Publish Angular Library To Local npm

geekstrick on September 18, 2020 🔥 9335 views

In this lesson, we will see how can we build our angular library and also will look into how can we publish the angular library to local npm and use it. Build Angular Library We can use the library in locally importing through the project folder but at the user end actual implementation is that […]

lesson
1 4 5 6 7 8 16