Lazy loading in angular is very useful with lazy loading we load data or component when we want to see the particular component.By default angular load all module, component when you are creating large scale application or mobile application performance…
Javascript Call Apply and Bind
Javascript call method example var john = { name:’John’, age:28, presentatoin:function(style,timeOfDay){ if(style == ‘formal’){ console.log(this.name + this.age + timeOfDay) } if(style == ‘friendly’){ console.log(this.name + this.age + timeOfDay) } } } john.presentatoin(‘formal’,’Goodmorning’) var emily = { name:’Emily’, age:23, } john.presentatoin.call(emily,’friendly’,’Evening’)…
JavaScript Closure
In closure inner function can access the variable and parameters of its outer function even after the outer function has returned.In this example inner function can access the retirement function parameter and (A) variable which is outsite for inner function…
Function returns function in Javascript
We will see how function return function.We can call this function in two way but the second one is better. script.js function interviewQuestion(job){ if(job == ‘designer’){ return function(name){ console.log(name + ‘can you please explain what UI design is?’); } }…
Angular4 Notification Component and Service
I have created notification service and component for example some one add,update,delete or edit or anything it will show message related to the functionality. Demo notify.service.ts import { Injectable } from ‘@angular/core’; import { BehaviorSubject } from ‘rxjs/BehaviorSubject’; @Injectable() export…
Angular4 ToDoList
In angular4 you can easily create todolist iam not saving data in browser local storage or any other database this is to show how we can simply create todolist in angular4. Demo app.module.cs import { BrowserModule } from ‘@angular/platform-browser’; import…
Angular 4 Model driven form validation
In angular4 you can easily validate form with model driven approach we will validate the same form (Demo) that we have validate using template driven approach with model driven approach all logic and validaiton done in component .If you go…
Angular 4 template driven form validation
In angular4 you can easily validate form with template driven approach all logic and validaiton done in template we need component only for data that we get from template.If you go to the demo link you can also see the…