<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Robert Look</title>
    <description>The latest articles on DEV Community by Robert Look (@robertlook).</description>
    <link>https://dev.to/robertlook</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F449048%2F09f48d45-9b44-4b14-bc12-1085da99f4a4.png</url>
      <title>DEV Community: Robert Look</title>
      <link>https://dev.to/robertlook</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/robertlook"/>
    <language>en</language>
    <item>
      <title>How To Add Angular Material Carousel Angular 10/11</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Thu, 15 Apr 2021 03:12:30 +0000</pubDate>
      <link>https://dev.to/robertlook/how-to-add-angular-material-carousel-angular-10-11-e62</link>
      <guid>https://dev.to/robertlook/how-to-add-angular-material-carousel-angular-10-11-e62</guid>
      <description>&lt;p&gt;This article will provide an Angular Material carousel in angular 11 material. if you have a question about the angular 11 material carousel slider example then I will give a simple example with a solution.  In this article, we will implement Angular Material carousel angular 10/11. Here you will learn how to add angular 11 material design carousel example step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-add-angular-material-carousel-angular.html"&gt;How To Add Angular Material Carousel Angular 10/11&lt;br&gt;
&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X6eg8PcX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_To_Add_Angular_Material_Carousel_Angular_10-111.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X6eg8PcX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_To_Add_Angular_Material_Carousel_Angular_10-111.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install npm Package&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;ng add @angular/material&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npm install @ngmodule/material-carousel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import MatCarouselModule&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; //---------  Important
import { MatCarouselModule } from '@ngmodule/material-carousel'; // ---------- Important

@NgModule({
  declarations: [
    AppComponent
  ],
  imports:      [
    BrowserModule, 
    BrowserAnimationsModule, // ---------- Important
    FormsModule,
    ReactiveFormsModule,
    MatCarouselModule.forRoot() // ---------- Important
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Update Ts File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { MatCarousel, MatCarouselComponent } from '@ngmodule/material-carousel'; // -------- important

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})

export class AppComponent {

  slides = [
      {'image': 'https://picsum.photos/seed/picsum/1200/300'}, 
      {'image': 'https://picsum.photos/seed/picsum/1200/300'},
      {'image': 'https://picsum.photos/seed/picsum/1200/300'}, 
      {'image': 'https://picsum.photos/seed/picsum/1200/300'}, 
      {'image': 'https://picsum.photos/seed/picsum/1200/300'}
    ];

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original Source: &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-add-angular-material-carousel-angular.html"&gt;https://www.phpcodingstuff.com/blog/how-to-add-angular-material-carousel-angular.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>carousel</category>
      <category>matrerial</category>
    </item>
    <item>
      <title>How To Convert HTML Page To PDF In Angular 11?</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Wed, 14 Apr 2021 03:19:18 +0000</pubDate>
      <link>https://dev.to/robertlook/how-to-convert-html-page-to-pdf-in-angular-11-42aa</link>
      <guid>https://dev.to/robertlook/how-to-convert-html-page-to-pdf-in-angular-11-42aa</guid>
      <description>&lt;p&gt;This tutorial will use jspdf, html2canvas, and jspdf package for generating pdf files from HTML. any project Many times we get the requirement to convert HTML to pdf in angular content to save in image format or pdf format for sending a report to users email many times. So, here I am going to explain about converting angular HTML to PDF content into PDF files in angular application. And will help you step by step on how to generate HTML to pdf angular 11 app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-convert-html-page-to-pdf-in-angular-11.html"&gt;How To Convert HTML Page To PDF In Angular 11?&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RdBZOvq6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_To_Convert_HTML_Page_To_PDF_In_Angular1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RdBZOvq6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_To_Convert_HTML_Page_To_PDF_In_Angular1.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install jspdf&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npm install html2canvas&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;update app.component.ts file&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import * as jspdf from 'jspdf';
import html2canvas from 'html2canvas';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    title = 'html-to-pdf-angular-application';
    public convetToPDF() {
        var data = document.getElementById('contentToConvert');
        html2canvas(data).then(canvas =&amp;gt; {
            // Few necessary setting options
            var imgWidth = 208;
            var pageHeight = 295;
            var imgHeight = canvas.height * imgWidth / canvas.width;
            var heightLeft = imgHeight;

            const contentDataURL = canvas.toDataURL('image/png')
            let pdf = new jspdf('p', 'mm', 'a4'); // A4 size page of PDF
            var position = 0;
            pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight)
            pdf.save('new-file.pdf'); // Generated PDF
        });
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above file, we have imported the jspdf and html2canvas library in our ts file in convert HTML to pdf angular. Below that we have a method in which we will create a button click from an HTML file...&lt;/p&gt;

&lt;p&gt;Original Source: &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-convert-html-page-to-pdf-in-angular-11.html"&gt;https://www.phpcodingstuff.com/blog/how-to-convert-html-page-to-pdf-in-angular-11.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>angular</category>
      <category>html</category>
    </item>
    <item>
      <title>Node JS Resize Image Upload Using Multer Sharp With Example</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Tue, 13 Apr 2021 02:57:26 +0000</pubDate>
      <link>https://dev.to/robertlook/node-js-resize-image-upload-using-multer-sharp-with-example-54g7</link>
      <guid>https://dev.to/robertlook/node-js-resize-image-upload-using-multer-sharp-with-example-54g7</guid>
      <description>&lt;p&gt;Resize image upload using multer, node js, and express js. In this tutorial, we learn node js resize an image using multer, sharp with node js, and express js. we learn javascript resizing images.&lt;/p&gt;

&lt;p&gt;Image upload is the basic requirement of any project. So this example will guide you step by step on how to upload multiple images using multer Express js Framework. And you can understand the concept of multiple image uploads easily to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/node-js-resize-image-upload-using-multer-sharp-with-example.html"&gt;Node JS Resize Image Upload Using Multer Sharp With Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Express and Multer Dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install express multer --save&lt;br&gt;
npm install sharp --save&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import Dependencies in Server.js File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const multer = require('multer');
const path = require('path');
const sharp = require('sharp');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create Server.js File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const multer = require('multer');
const path = require('path');
const sharp = require('sharp');
const fs = require('fs');
const app = express();
const port = 3000

const storage = multer.diskStorage({
    destination: function(req, file, cb) {
        cb(null, 'uploads/');
    },

    filename: function(req, file, cb) {
        cb(null, file.fieldname + '-' + Date.now() + path.extname(file.originalname));
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;.....&lt;/p&gt;

&lt;p&gt;Original Source: &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/node-js-resize-image-upload-using-multer-sharp-with-example.html"&gt;https://www.phpcodingstuff.com/blog/node-js-resize-image-upload-using-multer-sharp-with-example.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>resize</category>
      <category>multer</category>
    </item>
    <item>
      <title>How To Upload Multiple Image Using Multer In Node.js</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Mon, 12 Apr 2021 03:27:43 +0000</pubDate>
      <link>https://dev.to/robertlook/how-to-upload-multiple-image-using-multer-in-node-js-14ln</link>
      <guid>https://dev.to/robertlook/how-to-upload-multiple-image-using-multer-in-node-js-14ln</guid>
      <description>&lt;p&gt;In this node js tutorial, you will learn how to upload multiple images using multer in Node.js. In this tutorial, we will use npm Multer which you will see below. We learn Node js multiple image uploads using multer, in express js Framework.&lt;/p&gt;

&lt;p&gt;Image upload is the basic requirement of any project. So this example will guide you step by step on how to upload multiple images using multer Express js Framework. And you can understand the concept of multiple image upload easily to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html"&gt;How To Upload Multiple Image Using Multer In Node.js&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X45mNq6k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_to_upload_multiple_image_using_multer_in_Node_js1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X45mNq6k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/How_to_upload_multiple_image_using_multer_in_Node_js1.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Adding Multer&lt;br&gt;
&lt;code&gt;npm install express multer --save&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const multer = require('multer');
const path = require('path');
const app = express();
const port = 3000

const storage = multer.diskStorage({
    destination: function(req, file, cb) {
        cb(null, 'uploads/');
    },

    filename: function(req, file, cb) {
        cb(null, file.fieldname + '-' + Date.now() + path.extname(file.originalname));
    }
});

var upload = multer({ storage: storage })

app.get('/', (req, res) =&amp;gt; {
  res.sendFile(__dirname + '/index.html');
});

app.post('/', upload.array('multi-files'), (req, res) =&amp;gt; {
  res.redirect('/');
});

app.listen(port, () =&amp;gt; {
  console.log(`Example app listening at http://localhost:${port}`)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create Form&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;How To Upload Multiple Image Using Multer In Node.js - phpcodingstuff.com&amp;lt;/title&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1"&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Node js Express Multiple Image Upload using Multer Example - Tutsmake.com&amp;lt;/h1&amp;gt;
    &amp;lt;form action="/" enctype="multipart/form-data" method="post"&amp;gt;
      &amp;lt;input type="file" name="multi-files" accept='image/*' multiple&amp;gt;
      &amp;lt;input type="submit" value="Upload"&amp;gt;
    &amp;lt;/form&amp;gt;  
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original Source: &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html"&gt;https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>uplaod</category>
      <category>express</category>
    </item>
    <item>
      <title>File Upload With Multer In Node.js And Express</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Mon, 12 Apr 2021 03:21:21 +0000</pubDate>
      <link>https://dev.to/robertlook/file-upload-with-multer-in-node-js-and-express-24oc</link>
      <guid>https://dev.to/robertlook/file-upload-with-multer-in-node-js-and-express-24oc</guid>
      <description>&lt;p&gt;In this tutorial, we are going to learn how to upload images on the server with multer and express in Node.js. File upload is a common operation for any project. Node.js with the Express Web Framework and the multer Library, this tutorial we adding a file upload feature to your app is very easy. You will learn in this tutorial to make you comfortable in building apps that can easily handle any file uploads.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will be covering the following topics:&lt;/li&gt;
&lt;li&gt;What is Multer?&lt;/li&gt;
&lt;li&gt;Project Setup&lt;/li&gt;
&lt;li&gt;Adding Multer&lt;/li&gt;
&lt;li&gt;Disk Storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/file-upload-with-multer-in-nodejs-and-express.html"&gt;File Upload With Multer In Node.js And Express&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v8UrQa6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/File_Upload_with_Multer_in_Node_js_and_Express1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v8UrQa6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/File_Upload_with_Multer_in_Node_js_and_Express1.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding Multer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install multer --save&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const multer = require('multer');
const upload = multer({dest:'uploads/'}).single("demo_image");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following code will go in app.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.post("/image", (req, res) =&amp;gt; {
   upload(req, res, (err) =&amp;gt; {
    if(err) {
      res.status(400).send("Something went wrong!");
    }
    res.send(req.file);
  });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original Source :&lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/file-upload-with-multer-in-nodejs-and-express.html"&gt;File Upload With Multer In Node.js And Express&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>express</category>
    </item>
    <item>
      <title>Create/Generate QR Codes In Angular 10/11</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Sun, 07 Mar 2021 02:10:31 +0000</pubDate>
      <link>https://dev.to/robertlook/create-generate-qr-codes-in-angular-10-11-1oj6</link>
      <guid>https://dev.to/robertlook/create-generate-qr-codes-in-angular-10-11-1oj6</guid>
      <description>&lt;p&gt;We are learning How to generate QR code in angular 11. QR code generator app in easy process. we learn random QR code generator see below.&lt;/p&gt;

&lt;p&gt;This tutorial will use angularx-qrcode npm package to generate QR code in the angular 11 application. And import the QRCodeModule module code. see below step-by-step random QR code generator angular 11.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-create-generate-qr-codes-in-angular.html"&gt;Create/Generate QR Codes In Angular 10/11&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XH7U8DTu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/Generate_QR_Codes_in_Angular1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XH7U8DTu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/Generate_QR_Codes_in_Angular1.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 – Create New Angular App&lt;/strong&gt;&lt;br&gt;
First, of all let's start by creating an Angular 11 project using the Angular CLI.&lt;/p&gt;

&lt;p&gt;Open your terminal or command prompt, and generate a new angular project by running the following command: &lt;a href="https://www.phpcodingstuff.com/blog/how-to-install-angular-and-set-up-first-angular-project.html"&gt;Go&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng new my-new-app&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 – Install angularx-qrcode npm Package&lt;/strong&gt;&lt;br&gt;
In this step, you need to install angularx-qrcode in our angular application. So, the following command:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install angularx-qrcode --save&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 – Add Code on Module.ts File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { QRCodeModule } from 'angularx-qrcode';    //&amp;lt;------------ import this code ------------

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    QRCodeModule      //&amp;lt;------------ import this code ------------
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4 – Add Code on View File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Create/Generate QR Codes In Angular 10/11 -  phpcodingstuff.com&amp;lt;/h1&amp;gt;

&amp;lt;qrcode [qrdata]="'myAngularxQrCode'" [width]="256" [errorCorrectionLevel]="'M'"&amp;gt;&amp;lt;/qrcode&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cUer4vCn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/qr_code_php_coding_stuff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cUer4vCn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/qr_code_php_coding_stuff.png" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5 – Add Code On Component ts File&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  public myAngularxQrCode: string = null;

  constructor () {
    // assign a value
    this.myAngularxQrCode = 'Your QR code data string';
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 6 – Start Angular App&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng serve&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Original source: &lt;a href="https://www.phpcodingstuff.com/blog/how-to-create-generate-qr-codes-in-angular.html"&gt;https://www.phpcodingstuff.com/blog/how-to-create-generate-qr-codes-in-angular.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>node</category>
    </item>
    <item>
      <title>How To Implement Angular Service With Example</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Thu, 04 Mar 2021 03:22:19 +0000</pubDate>
      <link>https://dev.to/robertlook/how-to-implement-angular-service-with-example-2hnh</link>
      <guid>https://dev.to/robertlook/how-to-implement-angular-service-with-example-2hnh</guid>
      <description>&lt;p&gt;we are learning how to create angular service or import service as a global dependency via module and via component with example. In time we will see how to use the Angular service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why use Angular service&lt;/strong&gt;&lt;br&gt;
We sometimes have to use some code in our project again and again, just like we use an API call in our project instead we use Angular service which we once use in Angular service Write our own code and you can use that code anywhere through the components, it gives us ease, so we use Angular Service. We see some examples below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/how-to-implement-angular-service.html"&gt;How To Implement Angular Service With Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Angular Service&lt;/strong&gt;&lt;br&gt;
To create a service, we need to make use of the command line then open your command prompt. The command for the same is −&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng g service myservice&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--19T8vtjY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/service_img.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--19T8vtjY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/service_img.png" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app.module.ts.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AboutComponent } from './about/about.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {MatInputModule} from '@angular/material/input';
import {MatButtonModule} from '@angular/material/button';
import { MyserviceService } from './myservice.service';  //  &amp;lt;--------------Import service ---------------

@NgModule({
  declarations: [
    AppComponent,
    AboutComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    MatInputModule, 
    MatButtonModule 
  ],
  providers: [MyserviceService],  //  &amp;lt;------------ add service -------------------
  bootstrap: [AppComponent]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Original source: &lt;a href="https://www.phpcodingstuff.com/blog/how-to-implement-angular-service.html"&gt;https://www.phpcodingstuff.com/blog/how-to-implement-angular-service.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>node</category>
    </item>
    <item>
      <title>Angular material tutorial with Example - Angular 11</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Mon, 15 Feb 2021 03:30:14 +0000</pubDate>
      <link>https://dev.to/robertlook/angular-material-tutorial-with-example-angular-11-cl8</link>
      <guid>https://dev.to/robertlook/angular-material-tutorial-with-example-angular-11-cl8</guid>
      <description>&lt;p&gt;In This tutorial, you need to see an example of how to install angular material in angular 11. let's discuss the angular material tutorial. you will learn how to use material design in your project. follow the bellow step for install material design in angular 11.&lt;/p&gt;

&lt;p&gt;You need to create a new angular 11 project using the ng new command and then after we will install the material design using the ng add command. After that, we will create a very simple input form example with a button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/angular-material-tutorial-with-example-angular-11.html"&gt;Angular Material Tutorial With Example - Angular 11&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open Command promt and run &lt;/p&gt;

&lt;p&gt;&lt;code&gt;ng add @angular/material&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jGLxXF0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/cli_material_design_install.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jGLxXF0U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/cli_material_design_install.png" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;src/style.css&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Add application styles &amp;amp; imports to this file! */
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use Material Design&lt;/strong&gt;&lt;br&gt;
Then, Change&lt;br&gt;
&lt;strong&gt;src/app/app.module.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {MatInputModule} from '@angular/material/input';
import {MatButtonModule} from '@angular/material/button';

@NgModule({
  imports:      [ 
                     BrowserModule, 
                     FormsModule, 
                     MatInputModule, 
                     MatButtonModule 
],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;src/app/app.component.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;how to install angular material design - phpcodingstuff.com&amp;lt;/h1&amp;gt;

&amp;lt;form class="example-form"&amp;gt;
  &amp;lt;mat-form-field class="example-full-width"&amp;gt;
    &amp;lt;mat-label&amp;gt;Name:&amp;lt;/mat-label&amp;gt;
    &amp;lt;input matInput placeholder="Ex. Robert" value="Robert"&amp;gt;
  &amp;lt;/mat-form-field&amp;gt;

  &amp;lt;mat-form-field class="example-full-width"&amp;gt;
    &amp;lt;mat-label&amp;gt;Address:&amp;lt;/mat-label&amp;gt;
    &amp;lt;textarea matInput placeholder="Ex. New Your , USA"&amp;gt;&amp;lt;/textarea&amp;gt;
  &amp;lt;/mat-form-field&amp;gt;

  &amp;lt;button mat-raised-button color="primary"&amp;gt;Submit!&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UQMNgoWJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/demo_material_desing_php_coding_stuff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UQMNgoWJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/demo_material_desing_php_coding_stuff.png" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Original source : &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/angular-material-tutorial-with-example-angular-11.html"&gt;https://www.phpcodingstuff.com/blog/angular-material-tutorial-with-example-angular-11.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>material</category>
    </item>
    <item>
      <title>CRUD Operations In Express, Nodejs And MongoDB</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Sun, 14 Feb 2021 05:25:30 +0000</pubDate>
      <link>https://dev.to/robertlook/crud-operations-in-express-nodejs-and-mongodb-37lp</link>
      <guid>https://dev.to/robertlook/crud-operations-in-express-nodejs-and-mongodb-37lp</guid>
      <description>&lt;p&gt;in this tutorial we are learn CRUD Operations In Express, Nodejs And MongoDB. This blog may help you to get started, In this tutorial, we will be starting node.js express MongoDB crud creating a server and CRUD (Create, Read, Update and Delete) operations.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/crud-operations-in-express-nodejs-and-mongodb.html"&gt;CRUD Operations In Express, Nodejs And MongoDB&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dQ9RBBpt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/nodejs-express-router-get-in-users-js1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dQ9RBBpt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.phpcodingstuff.com/uploads/tutorial_images/nodejs-express-router-get-in-users-js1.jpg" alt="This is image title" title="This is image title"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Connectivity mongoose&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const mongoose = require('mongoose');

mongoose.connect('mongodb://localhost:27017/mongooseCRUD', {useNewUrlParser: true}, 
(err) =&amp;gt; {
    if (!err) {
        console.log('Successfully Established Connection with MongoDB')
    }
    else {
        console.log('Failed to Establish Connection with MongoDB with Error: '+ err)
    }
});
module.exports = mongoose;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;All User Controller function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require("express")
const User = require("../models/users")
const router = express.Router()
/**
 * User controller : All business logic goes here
 */
// Insert
router.post("/", async (req, res)=&amp;gt;{
    const user= new User({
        name: req.body.name
        email: req.body.email
    })
    try{
        let users= await user.save()
        res.status(200).json({
            status: 1,
            data: users
        })
    } catch(err){
        res.status(500).json({
            Message:err.message
        })
    }
})

/** 
 * Find all Users
 */

router.get("/", async (req, res)=&amp;gt;{
    try{
        let users= await User.find();
        res.status(200).json(users)
    } catch(err){
        res.status(500).json({
            Message:err.message
        })
    }
})

/** 
 * Find One Users
 */

router.get("/:id", async (req, res)=&amp;gt;{
    try{
        let users= await User.findById(req.params.id);
        res.status(200).json(users)
    } catch(err){
        res.status(500).json({
            Message:err.message
        })
    }

/** 
 * Remove One User
 */
router.delete("/:id", async (req, res)=&amp;gt;{
    try{
        let users= await User.findByIdAndRemove(req.params.id);
        res.status(200).json({
            message: "User deleted successfully!",
            Data: users
        })
    } catch(err){
        res.status(500).json({
            Message:err.message
        })
    }
})

/**
 * Update a user with the specified id in the request
 */
router.put("/:id", async (req, res)=&amp;gt;{
    try{
        let users= await User.findByIdAndUpdate(req.params.id, req.body, { new: true });
        res.status(200).json({
            message: "User Updated successfully!",
            Data: users
        })
    } catch(err){
        res.status(500).json({
            Message:err.message
        })
    }
module.exports = router
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Working with Routes.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * This code rootfile is a linke (index.js, app.js, server.js)
 */
const express = require('express')

const app = express()

const port = 3000

const mongoose = require('mongoose')

app.get('/', (req, res) =&amp;gt; {
  res.send('Hello World!')
})
app.use(express.json());

const userRouter = require("./routes/users")

app.use('/user', userRouter)

app.listen(port, () =&amp;gt; {
  console.log(`Example app listening at http://localhost:${port}`)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original source: &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/crud-operations-in-express-nodejs-and-mongodb.html"&gt;https://www.phpcodingstuff.com/blog/crud-operations-in-express-nodejs-and-mongodb.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>crud</category>
      <category>node</category>
    </item>
    <item>
      <title>Adding Bootstrap To Angular 11 Project With CLI</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Sun, 14 Feb 2021 04:33:15 +0000</pubDate>
      <link>https://dev.to/robertlook/adding-bootstrap-to-angular-11-project-with-cli-3gme</link>
      <guid>https://dev.to/robertlook/adding-bootstrap-to-angular-11-project-with-cli-3gme</guid>
      <description>&lt;p&gt;This tutorial will give you an example of angular 11 add bootstrap 4. it's a simple example of angular 11 install bootstrap 4. In this post, you learn to install bootstrap in angular 11.&lt;/p&gt;

&lt;p&gt;As we know Bootstrap is the world’s most popular framework for building responsive, and mobile-first websites. I show you how to add bootstrap in angular 11 project&lt;br&gt;
You can easily create your angular app using the below command: &lt;a href="https://www.phpcodingstuff.com/blog/how-to-install-angular-and-set-up-first-angular-project.html"&gt;(How To Install Angular And Set Up First Angular Application ?)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9QdzFu8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://file.mlog.club/images/2021/02/14/9b72f54d91434344bc24d023e053257d" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9QdzFu8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://file.mlog.club/images/2021/02/14/9b72f54d91434344bc24d023e053257d" alt="demo-bootstrap.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/adding-bootstrap-to-angular-11-project-with-cli.html"&gt;Adding Bootstrap To Angular 11 Project With CLI&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;....
      "styles": [
        "node_modules/bootstrap/dist/css/bootstrap.min.css",
        "src/styles.css"
      ],
      "scripts": [
          "node_modules/jquery/dist/jquery.min.js",
          "node_modules/bootstrap/dist/js/bootstrap.min.js"
      ]
.....
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;src/app/app.component.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container mt-5"&amp;gt;
    &amp;lt;div class="row"&amp;gt;
        &amp;lt;div class="col-md-2"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="col-md-8"&amp;gt;
            &amp;lt;div class="jumbotron"&amp;gt;
                &amp;lt;h2 class="display-4 text-center" &amp;gt;Welcome To Php Coding Stuff&amp;lt;/h2&amp;gt;
                &amp;lt;p class="lead text-center"&amp;gt;how to install bootstrap in angular 11.&amp;lt;/p&amp;gt;
                &amp;lt;hr class="my-4"&amp;gt;
              &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original source : &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/adding-bootstrap-to-angular-11-project-with-cli.html"&gt;https://www.phpcodingstuff.com/blog/adding-bootstrap-to-angular-11-project-with-cli.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>bootstrap</category>
    </item>
    <item>
      <title>Reactive Forms And Form Validation In Angular With Example</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Sat, 13 Feb 2021 03:55:26 +0000</pubDate>
      <link>https://dev.to/robertlook/reactive-forms-and-form-validation-in-angular-with-example-5062</link>
      <guid>https://dev.to/robertlook/reactive-forms-and-form-validation-in-angular-with-example-5062</guid>
      <description>&lt;p&gt;This tutorial we are learn how to create Reactive Forms And Form Validation In Angular With Example very simply form see below:&lt;br&gt;
provides a model-driven approach to handling form inputs value change over time. In this form reactive form, we need to import "ReactiveFormsModule" from the angular forms library. We will use FormControl, FormGroup, FormArray, Validation class with Reactive forms in angular.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/reactive-forms-and-form-validation-in-angular-with-example.html"&gt;Reactive Forms And Form Validation In Angular With Example&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;src/app/app.component.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Reactive Forms And Form Validation In Angular With Example - phpcodingstuff.com&amp;lt;/h1&amp;gt;

&amp;lt;form [formGroup]="form" (ngSubmit)="submit()"&amp;gt;

    &amp;lt;div class="form-group"&amp;gt;
        &amp;lt;label for="name"&amp;gt;Name&amp;lt;/label&amp;gt;
        &amp;lt;input formControlName="name" id="name" type="text" class="form-control"&amp;gt;
        &amp;lt;span *ngIf="form.name.touched &amp;amp;&amp;amp; form.name.invalid" class="text-danger"&amp;gt;Name is required.&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div class="form-group"&amp;gt;
        &amp;lt;label for="email"&amp;gt;Email&amp;lt;/label&amp;gt;
        &amp;lt;input formControlName="email" id="email" type="text"  class="form-control"&amp;gt;
        &amp;lt;span *ngIf="form.email.touched &amp;amp;&amp;amp; form.email.invalid" class="text-danger"&amp;gt;Email is required.&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div class="form-group"&amp;gt;
        &amp;lt;label for="body"&amp;gt;Body&amp;lt;/label&amp;gt;
        &amp;lt;textarea formControlName="body" id="body" type="text" class="form-control"&amp;gt;  &amp;lt;/textarea&amp;gt;
          &amp;lt;span *ngIf="form.body.touched &amp;amp;&amp;amp; form.body.invalid" class="text-danger"&amp;gt;Body is required.&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;button class="btn btn-primary" type="submit"&amp;gt;Submit&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;src/app/app.component.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { FormGroup, FormControl, Validators} from '@angular/forms';     // &amp;lt;----------------- This code---------------

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
    constructor() { }

  ngOnInit(): void {

  }

  form = new FormGroup({
    name: new FormControl('', Validators.required),
    email: new FormControl('', Validators.required),
    body: new FormControl('', Validators.required)
  });


  submit(){
    console.log(this.form.value);
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Original source : &lt;em&gt;&lt;a href="https://www.phpcodingstuff.com/blog/reactive-forms-and-form-validation-in-angular-with-example.html"&gt;https://www.phpcodingstuff.com/blog/reactive-forms-and-form-validation-in-angular-with-example.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>node</category>
    </item>
    <item>
      <title>Create RESTful Api With MySQL Database, Node.js, Expressjs</title>
      <dc:creator>Robert Look</dc:creator>
      <pubDate>Thu, 11 Feb 2021 03:07:47 +0000</pubDate>
      <link>https://dev.to/robertlook/create-restful-api-with-mysql-database-node-js-expressjs-21c2</link>
      <guid>https://dev.to/robertlook/create-restful-api-with-mysql-database-node-js-expressjs-21c2</guid>
      <description>&lt;p&gt;In this tutorial we crete a restfull api with mysql, node js framework express js?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.phpcodingstuff.com/blog/create-restful-api-with-mysql-database-node-js-expressjs.html"&gt;Create RESTful Api With MySQL Database, Node.js, Expressjs&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var mysql = require('mysql');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
    extended: true
}));


// default route
app.get('/', function (req, res) {
    return res.send({ error: true, message: 'Welcome to Php Coding Stuff website in phpcodingstuff.com' })
});
// connection configurations
var dbConn = mysql.createConnection({
    host: 'localhost',
    user: 'root',
    password: '',
    database: 'node_js_api'
});

// connect to database
dbConn.connect(); 


// Retrieve all users 
app.get('/users', function (req, res) {
    dbConn.query('SELECT * FROM users', function (error, results, fields) {
        if (error) throw error;
        return res.send({ error: false, data: results, message: 'users list.' });
    });
});


// Retrieve user with id 
app.get('/user/:id', function (req, res) {

    let user_id = req.params.id;

    if (!user_id) {
        return res.status(400).send({ error: true, message: 'Please provide user_id' });
    }

    dbConn.query('SELECT * FROM users where id=?', user_id, function (error, results, fields) {
        if (error) throw error;
        return res.send({ error: false, data: results[0], message: 'users list.' });
    });

});


// Add a new user  
app.post('/user', function (req, res) {

    let user = req.body.user;

    if (!user) {
        return res.status(400).send({ error:true, message: 'Please provide user' });
    }

    dbConn.query("INSERT INTO users SET ? ", { user: user }, function (error, results, fields) {
        if (error) throw error;
        return res.send({ error: false, data: results, message: 'New user has been created successfully.' });
    });
});


//  Update user with id
app.put('/user', function (req, res) {

    let user_id = req.body.user_id;
    let user = req.body.user;

    if (!user_id || !user) {
        return res.status(400).send({ error: user, message: 'Please provide user and user_id' });
    }

    dbConn.query("UPDATE users SET user = ? WHERE id = ?", [user, user_id], function (error, results, fields) {
        if (error) throw error;
        return res.send({ error: false, data: results, message: 'user has been updated successfully.' });
    });
});


//  Delete user
app.delete('/user', function (req, res) {

    let user_id = req.body.user_id;

    if (!user_id) {
        return res.status(400).send({ error: true, message: 'Please provide user_id' });
    }
    dbConn.query('DELETE FROM users WHERE id = ?', [user_id], function (error, results, fields) {
        if (error) throw error;
        return res.send({ error: false, data: results, message: 'User has been updated successfully.' });
    });
}); 

// set port
app.listen(3000, function () {
    console.log('Node app is running on port 3000');
});

module.exports = app;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>node</category>
      <category>express</category>
      <category>mysql</category>
    </item>
  </channel>
</rss>
