express router tutorial
express router tutorial Basic setup command npm init npm install express var express = require('express'); var myrouter = express.Router(); myrouter.get('/', function(req, res){ res.send('Get Route without parameter'); }); myrouter.get('/about', function(req, res){...
read moreExpress JS middleware with example
What is express middleware Middleware functions are functions that have access to the request object (req), the response object (res), and the next function in the application’s request-response cycle. The next function is a function in the Express router which, when...
read moreupdate , remove and drop queries in mongodb
update , remove and drop queries in mongodb Following command will update only single document(Default behaviour) db.info.update({},{$set : { age : 40 }}) Following command will update only Multiple document db.info.update({},{$set : { age : 40 }} , {multi : true})...
read moremongoDB basic queries Part-1
mongoDB basic queries Go to bin folder of mongo To Start Mongo server : click on mongod To Start Console for working ; click on mongo Start Writing queries Note : Mongo queries are case sensitive To Show All databases: show dbs To use database: use [databasename] To...
read moreserver html static files into node application
server html static files into node application Index Us Home About Us About Us Contact Us Contact Us h1 { color: red; } var http = require('http'); var fs = require('fs'); http.createServer(function(req,res){ var content = ''; var type = ''; if(req.url === "/") {...
read moreDefine and using Modules: node module export or import The module in the node is a simple JavaScript library where we write some variable and functions. in this tutorial, I am going to discuss that how we can define the module and import the module in another module....
read moreCreating web component in angular 6 : Angular element
Creating web component in angular 6: Angular element An angular element is a new feature of angular 6 framework angular elements translate your angular components into web component means using Angular 6 elements feature you can use your component as a Dom element....
read morehow to use bootstrap 4 carousel in angular 5 | 6
how to use carousel in angular 5 | 6 In this video tutorial, I implemented a bootstrap 4 carousel in angular 6 project. first I told you that how we can upgrade angular 5 to angular 6 packages, how we can install NG Bootstrap repository in our current angular...
read moreBuild a responsive Bootstrap 4 Navbar in Angular 5 without jQuery
Build a responsive Bootstrap 4 Navbar in Angular 5 without jQuery In this blog, I am demonstrating that how we can create collapsible navbar using Bootstrap and in angular 5 projects without using jquery and popper.js which are also not recommended by angular. To...
read moreRxJS operators for Observable emitted values. | filter | timer | interval | From | OF |Repeat | Buffer
RxJS operators for Observable emitted values Filter: Emit only those observable values which match with the filter condition. Example: In below example, we use range and filter together, range operator is using to generate sequential values from 0 to100 and filter...
read moreMicrosoft new version of typescript 3.0
Introduction of typescript 3.0 and new features of typescript 3.0 typescript 3.0 unveiled by Microsoft. Typescript is an open source which is a superset of javascript. Various new features are introduced in typescript 3.0 which makes easy developer efforts to handle...
read moreauth guard in angular example
angular auth guard example Routes enable the user to navigate through the application. Sometimes the user needs to do something before being allowed access to a certain part of the application—for example, log in. Route guards can be used to control access to certain...
read moreangular 4 unit testing | example
unit test in angular: Application testing is the major requirement in all programming languages. Testing the behavior or functionality of the application which must be match with user expectations. In angular two types of application testing may be performed. 1. End...
read moreangular 5 forkjoin example
Fork joins in angular Fork joins in angular are used to help to handle the concurrent request. Sometimes various data is gathered from multiple sources in a single request and data must be displayed only when complete data successfully arrives on the webpage from all...
read moreangular 4 caching using localstorage and rxjs operator | example
angular 4 caching using localstorage and rxjs operator In this blog , I am discussing a very important feature implementation in angular that may improve the performance of angular application. For example if we are getting data from web api using httpclient module...
read morelazy loading in angular
lazy loading in angular By default, all the components of angular are loaded at the time of application startup. As we give all component declaration in the main module i.e app.module.ts, therefore, all the declared components in app.module.ts are loaded whenever the...
read moreangular 4 viewchild example
ViewChild allows a one component to be injected into another. This means we need to implement the AfterViewInit lifecycle hook to receive the data from the child. ngAfterViewInit() is called after a component's view, and its children's views, are created. Its a...
read morengClass example in angular 5
The ngClass too works on the same lines, except that it is used to toggle one or multiple classes. For example, check out the following code: import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-ngclassex', templateUrl:...
read more