type script for loop
type script for loop //For Of Example var myfun = () => { var num: number[] = [2, 3, 10, 19] for (var item of num) { console.log(item); } } function getdata(): any { alert('hello'); } function getdata1(a: string, b: string, c: string='pratap nagar'): any {...
read moreType Script array example
Type Script Array Example var myfun = () => { var num: number[] = [2, 3, 10, 19] for (var i = 0; i < num.length; i++) { console.log(num[i]) } }
read moreInstallation of type script in visual studio code | Lecture -1
Run Project Using Command Prompt. Create Folder in D Drive Create file app.ts Open Command Prompt ,Reach upto File Write Following Command : tsc app.ts It will create an js file(app.js) Run File : node app.js Variable declaration in typescript: Variable Declared in...
read moreangular 4 reactive form example
Angular 4 reactive forms In this tutorial, I am going to discuss reactive forms or model-driven forms. Step 1. Add Following reference in app.module.ts import { FormsModule , ReactiveFormsModule } from '@angular/forms'; Step 2. Create New Component reactiveformex and...
read moreangular 4 nested formgroup example
Nested Formgroup Example In this example, I will show that how we can add form group into another form group or how we can create nested form groups in angular 4. Step 1: Create a new component(reactiveformex.component.ts) and add following code. import { Component,...
read moreangular 4 form builder example
FormBuilder in Angular 4 Angular form builder having API's through which we can manage our form controls in form groups. FormBuilder returns form group object using roup method. we are only passing the initial value and Validators for form control instead of creating...
read morecustom validators in angular 4
Custom Validators in Angular 5 Validators in angular 5, can we apply using two approaches first one is through HTML5 predefined validations (like required, pattern etc. ) the second one is by using angular form-control class or model-driven approach but angular 5...
read moreExample of server side and client side validation example using asp.net mvc data annotation
In this example, I demonstrate how we can implement client and server side data annotation in asp.net MVC.The major issue in checkbox generally occurred in client-side validations here client and server side validations are working fine using jQuery I just create an...
read moreangular 4 with asp.net core 2 and WEB API | REST services
In this tutorial and demonstrating that how we can create angular 4 project using Web API first task is to create Web API using Visual Studio and copy the address of running Web API which will be used later. Code for enabling cors in web API Step 1: Create a...
read moreKestrel Web Server Introduction
ASP.NET Core 2.0 Web Server – Kestrel Introduction Introduction of Kestrel Server 1.It is a cross-platform , event-driven, asynchronous I/O based , web server for ASP.net Core web applications. 2.It is a default server which is included with asp.net code project....
read moreExample of HTTP With map operator of observable
Step1 : Create Service ng g service myservice Step2 :Add Following Code in myservice.ts import { Injectable } from '@angular/core'; import { Http, HttpModule ,Response } from '@angular/http'; import 'rxjs/Rx'; @Injectable() export class MyserviceService {...
read moreExample of http get
Getting Data From Server using http GET Method We use it to make ajax calls to the server. The Http class provides the get() method for getting a resource, post() for creating it, put() for updating it, delete() for deleting resource and head() for getting metadata...
read moresimple example of angular 4 validations
To upgrade our form into an Angular form that can perform validation, we have to createFormControl andFormGroupobjects. A FormControl object represents a form control in a form. With it, we can track the value and validation status of an individual form control....
read moreangular 4 data binding | example
Angular 4 Two Way Data Binding Two-way data binding uses the ngModel directive, which is included in FormsModule. Bidirectional data flow(1. From form control to component property. 2 From Component property to Form Control) Two-way data binding is represented by...
read moreangular 4 reactive forms | model-driven forms | example
Angular 4 Model Driven Forms Angular offers two types of forms: template-driven and model-driven 1.It is also called reactive forms. 2.In this approach, we have to add an additional layer of complexity and functionality by having you to declare the model of the form...
read moretemplate driven angular 4 forms
Angular 4 Template Driven Forms: Angular offers two types of forms: template-driven and model-driven 1.Template Driven : template-driven forms place the emphasis on developing a form within an HTML template and handling most of the logic for the form-inputs, data...
read moreangular 4 routing
What is angular routing: Web applications can have different sections that correspond to different URLs, and supporting those sections programmatically is called routing. In Simple words, As per Url, open different angular components is called routing. URL Component...
read morecustom pipe in angular 4
What is Custom pipe and how to create custom pipe in angular 4 we have inbuilt pipes like lowercase, uppercase, slice, date etc which have their own functionality but if we want to create our custom login of filtering then we need to create custom filters. It has the...
read more