Skip to main content

Posts

Showing posts with the label Angular 5 vs Angular 6

Angular 6 Form submit Example

Create Anular6 project – using below command ng new project_name Go to the project - project_name directory Create the user component – using below command ng g component user Create the user class export class User {    public id : number ;    public name : string ;    public age : string ;    public url ?: string } Create user component - user.component.ts import { Component , OnInit } from '@angular/core' ; import { HttpClient , HttpHeaders } from   '@angular/common/http' ; import { FormBuilder , FormGroup , Validators } from '@angular/forms' ; import { User } from '../user; @ Component ({   selector: 'app-user' ,   templateUrl: './user.component.html' ,   styleUrls: [ './user.component.css' ] }) export class UserComponent implements OnInit {   model = new User ();//user model object   constructor () { }   ngOnInit (...

Angular 6 CRUD Operations Application and Example

The following frameworks, and modules are required for CREATE Angular 6 CRUD Applications : 1.       Node.js (recommended version) 2.       Angular CLI 3.       Angular 6 4.       Visual Studio code 5.       Node Command Line (Windows) or Integrated terminal Suppose that you have installed Node.js . Now, you need to check the versions of both Node.js and NPM.   Open the Integrated terminal or Node command line then type the below commands. node - v v8 . 11.1 And npm - v 6.0 . 0 Install Angular CLI and Create Angular 6 Web Application - To install or upgrade the latest Angular 6 CLI, type this command in the integrated terminal or Node command line. npm install - g @ angular / cli Now, you can create a new Angular 6 Web Application using this Angular CLI command. ng new Angular6App Next, go to the newly c...