Angular 4 Grid with CRUD operations -
Step
1 -
· Installed
NPM
· Installed
Visual Studio 2017.
· Installed
TypeScript 2.0 for Visual Studio 2017.
Step
2
-
· Create
ASP.NET MVC Web Application
· Go
to Visual Studio’s File New Project menu, expand the Web category and pick
ASP.NET Web Application.
Step
3 -
· Configure
Angular 4 and We need to prepare our frontend to run Angular 4.
Step
4-
· Creating
an Angular Service.
Step
5 –
· Configure
Service in NgModule.
import {NgModule } from '@angular/core'; import {BrowserModule} from '@angular/platform-browser'; import {FormsModule} from '@angular/forms'; import {HttpModule} from '@angular/http'; import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; import {AppComponent } from './app.component'; import {UserService} from './app.service'; @NgModule({ imports: [BrowserModule, FormsModule, HttpModule], declarations: [AppComponent], providers: [UserService], bootstrap: [AppComponent] }) class AppModule { } platformBrowserDynamic().bootstrapModule(AppModule);
Step
6 -
· Calling
an Angular Service in the Angular Component class.
Reference -
http://www.dotnetcurry.com/angularjs/1380/angular-4-grid-crud
I hope you are enjoying with this post! Please
share with you friends! Thank you!!!