Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

AngularJS Hosting Europe - HostForLIFE :: Using Services to Make Angular API Calls

clock July 25, 2024 07:31 by author Peter

Working with APIs is a standard chore in modern web development. Angular's HttpClient module offers a reliable method for managing HTTP requests. You will learn how to create an Angular service that will call an API and manage the responses in this tutorial.

Configuring Angular Project
Make sure you have Angular CLI installed before we begin. If not, you can use the following command to install it.
npm install -g @angular/cli

Create a new Angular project.
ng new api-service-demo
cd api-service-demo


Add HttpClientModule to your project.
ng add @angular/common/http

Creating the Service
Generate a new service using Angular CLI.
ng generate service api

This command will create a file named api.service.ts in the src/app directory.

Importing HttpClient

First, import HttpClient and HttpClientModule in your app.module.ts.
import { HttpClientModule } from '@angular/common/http';

@NgModule({
  declarations: [
    // Your components
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    // Other modules
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }


Implementing the API Call in the Service
Next, implement the API call in your service (api.service.ts).
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class ApiService {

  private apiUrl = 'https://jsonplaceholder.typicode.com/posts'; // Replace with your API URL

  constructor(private http: HttpClient) { }

  getPosts(): Observable<any> {
    return this.http.get<any>(this.apiUrl);
  }
}


In this example, getPosts is a method that sends a GET request to the specified API URL and returns an Observable of the response.

Using the Service in a Component

Now, let's use this service in a component to fetch data and display it. Generate a new component.ng generate component post-list
Injecting the Service
Inject the ApiService in your post-list.component.ts.import { Component, OnInit } from '@angular/core';
import { ApiService } from '../api.service';

@Component({
  selector: 'app-post-list',
  templateUrl: './post-list.component.html',
  styleUrls: ['./post-list.component.css']
})
export class PostListComponent implements OnInit {

  posts: any[] = [];

  constructor(private apiService: ApiService) { }

  ngOnInit(): void {
    this.apiService.getPosts().subscribe(data => {
      this.posts = data;
    });
  }
}
Displaying Data in the TemplateUpdate the template (post-list.component.html) to display the fetched data.<div *ngIf="posts.length > 0">
  <h2>Posts</h2>
  <ul>
    <li *ngFor="let post of posts">
      <h3>{{ post.title }}</h3>
      <p>{{ post.body }}</p>
    </li>
  </ul>
</div>
<div *ngIf="posts.length === 0">
  <p>No posts available.</p>
</div>


Running the Application
Serve the Angular application using the following command.
ng serve

Navigate to http://localhost:4200 in your browser to see the list of posts fetched from the API.

Conclusion
In this article, we've covered how to make API calls in Angular using a service. We created a service to handle HTTP requests and used this service in a component to fetch and display data. This approach ensures that your API logic is centralized and reusable across different components.



AngularJS Hosting Europe - HostForLIFE :: Highlight Active Menu Item Dynamically in Angular Based on Route

clock July 19, 2024 07:38 by author Peter

Angular's built-in Router module can be used to dynamically highlight the active menu item in an Angular application based on the current path. You can now apply a class to the active link as a result.


Here's how to accomplish it.

Step 1. Import the RouterModule

Ensure that your Angular module—typically app.module.ts—has the RouterModule set.

import { RouterModule } from '@angular/router';
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

Step 2. Update your HTML
Use the routerLinkActive directive to dynamically apply a class to the active menu item. Here’s how you can update your navigation HTML.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Navbar Example</title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  <style>
    .navbar-nav .nav-item a {
      color: black;
      text-decoration: none;
    }
    .navbar-nav .nav-item a:hover {
      color: #0056b3; /* Optional: Change color on hover */
    }
    .navbar-nav .home-link i {
      color: blue;
    }
    .active-link {
      color: blue !important; /* Customize the active link color */
    }
  </style>
</head>
<body>

<section class="wrapper megamenu-wraper">
  <div class="">
    <nav class="container navbar navbar-expand-lg main-menu">
      <div class="">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item">
              <a routerLink="/private/po" routerLinkActive="active-link" class="home-link active">
                <i class="fa fa-home"></i>
              </a>
            </li>
            <li class="nav-item">
              <a routerLink="dashboard" routerLinkActive="active-link">Dashboard</a>
            </li>
            <li class="nav-item">
              <a routerLink="default" routerLinkActive="active-link">Student List</a>
            </li>
            <li class="nav-item">
              <a routerLink="camps" routerLinkActive="active-link">Activities</a>
            </li>
            <li class="nav-item">
              <a routerLink="camp-attendence" routerLinkActive="active-link">Attendance</a>
            </li>
            <li class="nav-item">
              <a [routerLink]="['/private/po/actvity-camp', 0]" routerLinkActive="active-link">Create Activity</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>
  </div>
</section>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>

Explanation

  • routerLinkActive Directive: This directive applies the specified class (active-link in this case) to the link that matches the current route.
  • routerLink Directive: This binds the link to the router path.
  • CSS: The active-link class is styled to indicate the active state.

Step 3. Ensure router module configuration
Make sure your Angular router is correctly configured in your application module (usually app-routing.module.ts).
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './dashboard/dashboard.component';
import { StudentListComponent } from './student-list/student-list.component';
import { ActivitiesComponent } from './activities/activities.component';
import { AttendanceComponent } from './attendance/attendance.component';
import { CreateActivityComponent } from './create-activity/create-activity.component';
const routes: Routes = [
  { path: 'dashboard', component: DashboardComponent },
  { path: 'default', component: StudentListComponent },
  { path: 'camps', component: ActivitiesComponent },
  { path: 'camp-attendence', component: AttendanceComponent },
  { path: 'private/po/actvity-camp/:id', component: CreateActivityComponent },
  { path: '**', redirectTo: 'dashboard', pathMatch: 'full' }
];
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }


This setup ensures that when you navigate through your app, the active link will be highlighted, providing a better user experience.



AngularJS Hosting Europe - HostForLIFE :: Use GitHub Copilot to Learn About Angular Karma Test Cases

clock July 15, 2024 07:55 by author Peter

Make sure you have components and test files for them first. I've made the device.ts and device.test.ts files for this example. Please make use of the pictures below.

Add the required function methods after that. For example, pushToDevice is in charge of pushing data to devices and is also in charge of sending data to the backend.

Add test cases to the device.test.ts file after generating the device.ts and device.test.ts files and including the pushToDevice and sendToBackend methods. Some sample function names that you might use are listed below. If you used the enter tab key to input the function name.

import { describe, expect, test } from '@jest/globals';
import { PushToDevice } from './device';
class Device {
    DeviceID?: number;
    DeviceSerialNumber: string;
}

The copilot will now provide one to five test examples for these techniques. Please see the screenshot up above. The test cases will be executed by Angular. To run and execute the cases, simply type the command "npm run test" into the console. In accordance with the context you supply, it might help by offering several test case samples. This is how these test cases could be organized and run in an Angular project.

The application running time will display if there is a problem. In the event that not, cases ran in the Chrome window opened. Here's what usually occurs when you use Karma (which runs tests in actual browsers like Chrome) and Jasmine to execute tests in an Angular application: When you execute the npm run test in your terminal or command prompt, Karma will record and show this error.

 



AngularJS Hosting Europe - HostForLIFE :: Using Route-Based Angular to Dynamically Highlight the Active Menu Item

clock July 8, 2024 10:08 by author Peter

Angular's built-in Router module can be used to dynamically highlight the active menu item in an Angular application based on the current path. You can now apply a class to the active link as a result.


Here's how to accomplish it.

First, import the RouterModule

Ensure that your Angular module—typically app.module.ts—has the RouterModule set.

import { RouterModule } from '@angular/router';
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

Step 2. Update your HTML
Use the routerLinkActive directive to dynamically apply a class to the active menu item. Here’s how you can update your navigation HTML.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Navbar Example</title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
  <style>
    .navbar-nav .nav-item a {
      color: black;
      text-decoration: none;
    }
    .navbar-nav .nav-item a:hover {
      color: #0056b3; /* Optional: Change color on hover */
    }
    .navbar-nav .home-link i {
      color: blue;
    }
    .active-link {
      color: blue !important; /* Customize the active link color */
    }
  </style>
</head>
<body>

<section class="wrapper megamenu-wraper">
  <div class="">
    <nav class="container navbar navbar-expand-lg main-menu">
      <div class="">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item">
              <a routerLink="/private/po" routerLinkActive="active-link" class="home-link active">
                <i class="fa fa-home"></i>
              </a>
            </li>
            <li class="nav-item">
              <a routerLink="dashboard" routerLinkActive="active-link">Dashboard</a>
            </li>
            <li class="nav-item">
              <a routerLink="default" routerLinkActive="active-link">Student List</a>
            </li>
            <li class="nav-item">
              <a routerLink="camps" routerLinkActive="active-link">Activities</a>
            </li>
            <li class="nav-item">
              <a routerLink="camp-attendence" routerLinkActive="active-link">Attendance</a>
            </li>
            <li class="nav-item">
              <a [routerLink]="['/private/po/actvity-camp', 0]" routerLinkActive="active-link">Create Activity</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>
  </div>
</section>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>


Explanation
routerLinkActive Directive: This directive applies the specified class (active-link in this case) to the link that matches the current route.
routerLink Directive: This binds the link to the router path.
CSS: The active-link class is styled to indicate the active state.

Step 3. Ensure router module configuration
Make sure your Angular router is correctly configured in your application module (usually app-routing.module.ts).
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './dashboard/dashboard.component';
import { StudentListComponent } from './student-list/student-list.component';
import { ActivitiesComponent } from './activities/activities.component';
import { AttendanceComponent } from './attendance/attendance.component';
import { CreateActivityComponent } from './create-activity/create-activity.component';
const routes: Routes = [
  { path: 'dashboard', component: DashboardComponent },
  { path: 'default', component: StudentListComponent },
  { path: 'camps', component: ActivitiesComponent },
  { path: 'camp-attendence', component: AttendanceComponent },
  { path: 'private/po/actvity-camp/:id', component: CreateActivityComponent },
  { path: '**', redirectTo: 'dashboard', pathMatch: 'full' }
];
@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

This setup ensures that when you navigate through your app, the active link will be highlighted, providing a better user experience.



AngularJS Hosting Europe - HostForLIFE :: Dependency Injection System in Angular 18

clock July 4, 2024 07:59 by author Peter

There are many of fascinating new features and enhancements in Angular 18. A notable improvement is the revamped Dependency Injection (DI) framework. Managing the dependencies of components and services is essential to creating scalable and maintainable applications using Angular's DI paradigm. To experience the new DI features in Angular 18, let's explore them in detail and work through an example.

What's New in the DI System of Angular 18?

  • Enhanced Tree-Shakability: Angular 18 makes sure that the final bundle contains only the code that is required. Smaller, more effective applications result from this.
  • Injection Contexts: With the introduction of new injection contexts, developers now have greater power and flexibility in defining and managing various dependency injection contexts.
  • Provider Scopes: Enhancing resource management and efficiency, this new feature gives you more precise control over the lifecycle of dependencies.
  • Simplified Provider Syntax: In Angular 18, a more understandable and maintainable syntax for declaring providers is introduced.

Using the New Dependency Injection Features in Angular 18 as an Example
Let's create a basic Angular 18 application to showcase these latest features in DI. We'll build a service, integrate it with a component, and investigate the recently added DI features.

First Step: Configuring the Angular 18 Project

First, use the Angular CLI to create a new Angular 18 project.

Step 1. Setting Up the Angular 18 Project
First, set up a new Angular 18 project using the Angular CLI
ng new angular18-di-demo
cd angular18-di-demo


Step 2. Creating a Service
We'll create a new service to provide some data to our component. Run the following command to generate the service:
ng generate service data

Open data.service.ts and implement the service like this:
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class DataService {
  private data = ['Angular 18', 'Dependency Injection', 'New Features'];

  constructor() {}

  getData(): string[] {
    return this.data;
  }
}

Here, the @Injectable decorator with providedIn: 'root' makes this service available throughout the application.

Step 3. Creating a Component
Next, we'll create a component to display the data provided by DataService. Run the following command.
ng generate component data-display

Open data-display.component.ts and inject DataService.
import { Component, OnInit } from '@angular/core';
import { DataService } from '../data.service';

@Component({
  selector: 'app-data-display',
  templateUrl: './data-display.component.html',
  styleUrls: ['./data-display.component.css']
})
export class DataDisplayComponent implements OnInit {
  data: string[] = [];

  constructor(private dataService: DataService) {}

  ngOnInit(): void {
    this.data = this.dataService.getData();
  }
}

In this component, we inject DataService in the constructor and use it to fetch data in the ngOnInit lifecycle hook.

Step 4. Displaying the Data

Open data-display.component.html and update the template to display the data:
<div>
  <h2>Data from DataService</h2>
  <ul>
    <li *ngFor="let item of data">{{ item }}</li>
  </ul>
</div>

Step 5. Using the Component
Include the DataDisplayComponent in your main application component. Open app.component.html and add the following.
<app-data-display></app-data-display>

Step 6. Running the Application
Run the application using the Angular CLI.

ng serve

Navigate to http://localhost:4200 in your browser. You should see the data displayed from DataService.

Summary

In this article, we've explored the new Dependency Injection features in Angular 18. By creating a simple service and component, we've seen how to use DI in Angular 18. The enhancements in the DI system, such as improved tree-shakability, injection contexts, provider scopes, and simplified syntax, make managing dependencies in Angular applications easier and more efficient. These features will help you maintain a clean and scalable codebase as you build more complex applications.



AngularJS Hosting Europe - HostForLIFE :: Apply Dynamically Changing Filters to Kendo Grid in Angular

clock June 26, 2024 07:59 by author Peter

You may use the built-in features of the Kendo Grid in conjunction with Angular's component lifecycle hooks to apply dynamic filters in a Kendo Grid based on the data type of each column. Here's how you can make this happen.


Install the required packages
Make sure the Angular Grid package's Kendo UI is installed.

npm install @progress/kendo-angular-grid \
            @progress/kendo-angular-inputs \
            @progress/kendo-angular-l10n \
            @progress/kendo-angular-dateinputs \
            @progress/kendo-angular-dropdowns --save


Import Kendo Modules
Import the necessary Kendo UI modules into your Angular module.
import { GridModule } from '@progress/kendo-angular-grid';
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
import { InputsModule } from '@progress/kendo-angular-inputs';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
@NgModule({
  imports: [
    GridModule,
    DateInputsModule,
    InputsModule,
    DropDownsModule
    // other imports
  ],
  // other configurations
})
export class AppModule {}


Define the grid in your component template
Create the Kendo Grid in your component template and bind it to a data source.
<kendo-grid [data]="gridData" [filterable]="true">
  <kendo-grid-column *ngFor="let column of columns"
                     [field]="column.field"
                     [title]="column.title"
                     [filter]="getFilterType(column)">
  </kendo-grid-column>
</kendo-grid>


Determine the filter type dynamically
In your component, write a method to return the filter type based on the column's data type.
import { Component, OnInit } from '@angular/core';
@Component({
  selector: 'app-dynamic-filter-grid',
  templateUrl: './dynamic-filter-grid.component.html',
  styleUrls: ['./dynamic-filter-grid.component.css']
})
export class DynamicFilterGridComponent implements OnInit {
  public gridData: any[] = [
    { name: 'John', age: 30, birthday: new Date(1990, 1, 1) },
    { name: 'Jane', age: 25, birthday: new Date(1995, 2, 1) },
    // more data
  ];

  public columns: any[] = [
    { field: 'name', title: 'Name', type: 'string' },
    { field: 'age', title: 'Age', type: 'number' },
    { field: 'birthday', title: 'Birthday', type: 'date' }
  ];
  constructor() { }
  ngOnInit(): void { }
  getFilterType(column: any): string {
    switch (column.type) {
      case 'date':
        return 'date';
      case 'number':
        return 'numeric';
      default:
        return 'text';
    }
  }
}


Add the component template

In your component HTML file, use the Kendo Grid and call the dynamic filter method.
<kendo-grid [data]="gridData" [filterable]="true">
  <kendo-grid-column *ngFor="let column of columns"
                     [field]="column.field"
                     [title]="column.title"
                     [filter]="getFilterType(column)">
  </kendo-grid-column>
</kendo-grid>


Conclusion
With these steps, your Kendo Grid will apply filters dynamically based on the data type of each column.



AngularJS Hosting Europe - HostForLIFE :: Using Entity Framework to Begin With HTTP Client Get Request in Angular 8

clock June 6, 2024 08:53 by author Peter

In this post, I'll explain how to use the HttpClient module in Angular 8 to consume RESfFul API and how to use the entity framework to get requests. Requests for GET, POST, PUT, PATCH, and DELETE are handled by the HttpClient module. HTTP can be used by an Angular application to communicate with backend services.

RxJs observable-based API is available with Angular HTTP. When an HTTP request is unsuccessful, Observable generates an error.

Note: I won't go over the CRUD process in this post. This article aims to clarify things for newcomers.

Step 1. Create tables in the database
Consider the simple example of employees in a hotel. We will show the name & email ID of the employee in a hotel on the view in the last step of this article.

I am going to create one database & will add the table with some values. Use the below script for more information. Note that you can create a database structure as per your requirements.

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Employee](
    [Id] [int] IDENTITY(1,1) NOT NULL,
      NULL,
      NULL,
      NULL,
    CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
    (
        [Id] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Employee] ON
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (1, N'Rupesh', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (2, N'Ashish', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (3, N'Sam', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (4, N'Ajit', N'[email protected]', N'123')
SET IDENTITY_INSERT [dbo].[Employee] OFF

Step 2: Establish a Web Application
First, we'll use Visual Studio to construct a WebAPI application. Navigate to File => New => Project after opening Visual Studio. Open a new project, choose an empty ASP.NET + WebAPI project from the template, and give it a name.

In our project, create the entity data model (.edmx) file by right-clicking on the solution, selecting Add, then New Item, and then choosing ADO.NET Entity Data Model from the Visual C# installed template in Data. Give it a name.

Create a web API controller by using the Entity framework. Use the Web API controller with REST actions to perform a CRUD operation from the entity framework context.

Give our controller a name. From the drop-down, choose the name of the context class.

We need to enable the CORS attribute on the above controller level as per the below syntax. CORS stands for Cross-Origin Resource Sharing. For more information refer to this article.
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class EmployeesController : ApiController
{
    // Our CRUD operation code here
}

The whole controller code is as shown below.
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class EmployeesController : ApiController
{
    private HotelEntities db = new HotelEntities();
    // GET: api/Employees
    public List<Employee> GetAllEmployees()
    {
        return db.Employees.ToList();
    }
    // GET: api/Employees/5
    [ResponseType(typeof(Employee))]
    public IHttpActionResult GetEmployee(int id)
    {
        Employee employee = db.Employees.Find(id);
        if (employee == null)
        {
            return NotFound();
        }
        return Ok(employee);
    }
    // PUT: api/Employees/5
    [ResponseType(typeof(void))]
    public IHttpActionResult PutEmployee(int id, Employee employee)
    {
        if (!ModelState.IsValid)
        {
            return BadRequest(ModelState);
        }
        if (id != employee.Id)
        {
            return BadRequest();
        }
        db.Entry(employee).State = EntityState.Modified;
        try
        {
            db.SaveChanges();
        }
        catch (DbUpdateConcurrencyException)
        {
            if (!EmployeeExists(id))
            {
                return NotFound();
            }
            else
            {
                throw;
            }
        }
        return StatusCode(HttpStatusCode.NoContent);
    }
    // POST: api/Employees
    [ResponseType(typeof(Employee))]
    public IHttpActionResult PostEmployee(Employee employee)
    {
        if (!ModelState.IsValid)
        {
            return BadRequest(ModelState);
        }
        db.Employees.Add(employee);
        db.SaveChanges();
        return CreatedAtRoute("DefaultApi", new { id = employee.Id }, employee);
    }
    // DELETE: api/Employees/5
    [ResponseType(typeof(Employee))]
    public IHttpActionResult DeleteEmployee(int id)
    {
        Employee employee = db.Employees.Find(id);
        if (employee == null)
        {
            return NotFound();
        }
        db.Employees.Remove(employee);
        db.SaveChanges();

        return Ok(employee);
    }
    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            db.Dispose();
        }
        base.Dispose(disposing);
    }
    private bool EmployeeExists(int id)
    {
        return db.Employees.Count(e => e.Id == id) > 0;
    }
}

Step 3. To create an Angular Project

Create a new service in our Angular application using syntax & create a company service.
ng g service our_service_name

Now we will write code to get the data from our API in the service i.e. company.service.ts file contains the below code.
Note. Do not use a direct URL link in the typescript file anyone can easily hack it. For demo purposes, I have used it.

The below code contains the file company.service.ts.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Company } from '../Model/company';

@Injectable({
  providedIn: 'root'
})
export class CompanyService {

  constructor(private http: HttpClient) { }

  getData() {
    return this.http.get("http://localhost:8012/api/Employees");
  }
}

In the above code, CompanyService is a class that contains our getData method that returns a result from API from where we are getting a record using a GET request, API/Employees (which is written in the API project). We can also host our API project & add that URL as well.

Step 4. Create a new component in our angular project
Now create a new component in our angular project using syntax & create the my-company component.
ng g c componentName


The below code contains the file my-company.component.html.
<p>Angular 8 using Web API !!!</p>

<div>
  <table class="gridList">
    <tr>
      <th>User Names</th>
      <th>Email</th>
    </tr>
    <tr *ngFor="let item of companyList">
      <td>{{ item.Name }}</td>
      <td>{{ item.Email }}</td>
    </tr>
  </table>
</div>


In the above code, we have used ngFor to iterate the loop. companyList is a variable in which we will get the data from our services refer to the below steps.

The below code contains the file my-company.component .ts
import { BrowserModule, Title } from '@angular/platform-browser';
import { Component, OnInit, ViewChild } from '@angular/core';
import { CompanyService } from '../../service/company.service';
@Component({
  selector: 'app-my-company',
  templateUrl: './my-company.component.html',
  styleUrls: ['./my-company.component.css']
})
export class MyCompanyComponent implements OnInit {
  companyList: any;
  constructor(private companyService: CompanyService) { }
  ngOnInit() {
    this.getData();
  }
  getData() {
    this.companyService.getData().subscribe(
      data => {
        this.companyList = data;
      }
    );
  }
}


In the above code, we have imported the company service. In the OnInit method, we will declare one variable company list & will assign the data that is returned by our method getData() from service.

Here, subscribe is used to send the list.

Step 5. Loading the company component in app.component.html

Now, to load our company component, we will add a selector in the app.component.html file.
<app-my-company></app-my-company>
<app-my-company></app-my-company>


Step 6. To run the Angular application

To run the Angular application, use the below syntax.
ng serve -o



AngularJS Hosting Europe - HostForLIFE :: Using Entity Framework to Begin With HTTP Client Get Request in Angular 8

clock June 6, 2024 08:53 by author Peter

In this post, I'll explain how to use the HttpClient module in Angular 8 to consume RESfFul API and how to use the entity framework to get requests. Requests for GET, POST, PUT, PATCH, and DELETE are handled by the HttpClient module. HTTP can be used by an Angular application to communicate with backend services.


RxJs observable-based API is available with Angular HTTP. When an HTTP request is unsuccessful, Observable generates an error.

Note: I won't go over the CRUD process in this post. This article aims to clarify things for newcomers.

Step 1. Create tables in the database
Consider the simple example of employees in a hotel. We will show the name & email ID of the employee in a hotel on the view in the last step of this article.

I am going to create one database & will add the table with some values. Use the below script for more information. Note that you can create a database structure as per your requirements.

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Employee](
    [Id] [int] IDENTITY(1,1) NOT NULL,
      NULL,
      NULL,
      NULL,
    CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
    (
        [Id] ASC
    ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Employee] ON
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (1, N'Rupesh', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (2, N'Ashish', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (3, N'Sam', N'[email protected]', N'123')
INSERT [dbo].[Employee] ([Id], [Name], [Email], [Password]) VALUES (4, N'Ajit', N'[email protected]', N'123')
SET IDENTITY_INSERT [dbo].[Employee] OFF

Step 2: Establish a Web Application
First, we'll use Visual Studio to construct a WebAPI application. Navigate to File => New => Project after opening Visual Studio. Open a new project, choose an empty ASP.NET + WebAPI project from the template, and give it a name.

In our project, create the entity data model (.edmx) file by right-clicking on the solution, selecting Add, then New Item, and then choosing ADO.NET Entity Data Model from the Visual C# installed template in Data. Give it a name.

Create a web API controller by using the Entity framework. Use the Web API controller with REST actions to perform a CRUD operation from the entity framework context.

Give our controller a name. From the drop-down, choose the name of the context class.

We need to enable the CORS attribute on the above controller level as per the below syntax. CORS stands for Cross-Origin Resource Sharing. For more information refer to this article.
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class EmployeesController : ApiController
{
    // Our CRUD operation code here
}

The whole controller code is as shown below.
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class EmployeesController : ApiController
{
    private HotelEntities db = new HotelEntities();
    // GET: api/Employees
    public List<Employee> GetAllEmployees()
    {
        return db.Employees.ToList();
    }
    // GET: api/Employees/5
    [ResponseType(typeof(Employee))]
    public IHttpActionResult GetEmployee(int id)
    {
        Employee employee = db.Employees.Find(id);
        if (employee == null)
        {
            return NotFound();
        }
        return Ok(employee);
    }
    // PUT: api/Employees/5
    [ResponseType(typeof(void))]
    public IHttpActionResult PutEmployee(int id, Employee employee)
    {
        if (!ModelState.IsValid)
        {
            return BadRequest(ModelState);
        }
        if (id != employee.Id)
        {
            return BadRequest();
        }
        db.Entry(employee).State = EntityState.Modified;
        try
        {
            db.SaveChanges();
        }
        catch (DbUpdateConcurrencyException)
        {
            if (!EmployeeExists(id))
            {
                return NotFound();
            }
            else
            {
                throw;
            }
        }
        return StatusCode(HttpStatusCode.NoContent);
    }
    // POST: api/Employees
    [ResponseType(typeof(Employee))]
    public IHttpActionResult PostEmployee(Employee employee)
    {
        if (!ModelState.IsValid)
        {
            return BadRequest(ModelState);
        }
        db.Employees.Add(employee);
        db.SaveChanges();
        return CreatedAtRoute("DefaultApi", new { id = employee.Id }, employee);
    }
    // DELETE: api/Employees/5
    [ResponseType(typeof(Employee))]
    public IHttpActionResult DeleteEmployee(int id)
    {
        Employee employee = db.Employees.Find(id);
        if (employee == null)
        {
            return NotFound();
        }
        db.Employees.Remove(employee);
        db.SaveChanges();

        return Ok(employee);
    }
    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            db.Dispose();
        }
        base.Dispose(disposing);
    }
    private bool EmployeeExists(int id)
    {
        return db.Employees.Count(e => e.Id == id) > 0;
    }
}

Step 3. To create an Angular Project

Create a new service in our Angular application using syntax & create a company service.
ng g service our_service_name

Now we will write code to get the data from our API in the service i.e. company.service.ts file contains the below code.
Note. Do not use a direct URL link in the typescript file anyone can easily hack it. For demo purposes, I have used it.

The below code contains the file company.service.ts.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Company } from '../Model/company';

@Injectable({
  providedIn: 'root'
})
export class CompanyService {

  constructor(private http: HttpClient) { }

  getData() {
    return this.http.get("http://localhost:8012/api/Employees");
  }
}

In the above code, CompanyService is a class that contains our getData method that returns a result from API from where we are getting a record using a GET request, API/Employees (which is written in the API project). We can also host our API project & add that URL as well.

Step 4. Create a new component in our angular project
Now create a new component in our angular project using syntax & create the my-company component.
ng g c componentName


The below code contains the file my-company.component.html.
<p>Angular 8 using Web API !!!</p>

<div>
  <table class="gridList">
    <tr>
      <th>User Names</th>
      <th>Email</th>
    </tr>
    <tr *ngFor="let item of companyList">
      <td>{{ item.Name }}</td>
      <td>{{ item.Email }}</td>
    </tr>
  </table>
</div>


In the above code, we have used ngFor to iterate the loop. companyList is a variable in which we will get the data from our services refer to the below steps.

The below code contains the file my-company.component .ts
import { BrowserModule, Title } from '@angular/platform-browser';
import { Component, OnInit, ViewChild } from '@angular/core';
import { CompanyService } from '../../service/company.service';
@Component({
  selector: 'app-my-company',
  templateUrl: './my-company.component.html',
  styleUrls: ['./my-company.component.css']
})
export class MyCompanyComponent implements OnInit {
  companyList: any;
  constructor(private companyService: CompanyService) { }
  ngOnInit() {
    this.getData();
  }
  getData() {
    this.companyService.getData().subscribe(
      data => {
        this.companyList = data;
      }
    );
  }
}


In the above code, we have imported the company service. In the OnInit method, we will declare one variable company list & will assign the data that is returned by our method getData() from service.

Here, subscribe is used to send the list.

Step 5. Loading the company component in app.component.html

Now, to load our company component, we will add a selector in the app.component.html file.
<app-my-company></app-my-company>
<app-my-company></app-my-company>


Step 6. To run the Angular application

To run the Angular application, use the below syntax.
ng serve -o



AngularJS Hosting Europe - HostForLIFE :: Opening Angular: Enhanced Functionalities, Safety, and ERP Integration

clock May 14, 2024 07:56 by author Peter

Enterprise resource planning (ERP) technologies are essential for optimizing business operations in the quickly changing digital landscape of today. Robust ERP solutions are becoming more and more necessary as businesses expand. With its cutting-edge functionality, improved security features, and speed gains, Angular is a formidable framework for creating cutting-edge ERP apps. This article will explore how Angular may boost ERP projects, emphasizing how it integrates with.NET Core online apps effortlessly and offers enhanced features, security advancements, and speed gains.

Advanced Functionalities
The extensive feature set of Angular enables developers to design complex ERP solutions that are suited to certain business requirements. Let's look at an actual instance of Angular integration in an inventory management ERP project.

// Angular component for inventory management
import { Component, OnInit } from '@angular/core';
import { InventoryService } from './inventory.service';
import { InventoryItem } from './inventory-item.model';

@Component({
  selector: 'app-inventory',
  templateUrl: './inventory.component.html',
  styleUrls: ['./inventory.component.css']
})
export class InventoryComponent implements OnInit {
  inventoryItems: InventoryItem[];

  constructor(private inventoryService: InventoryService) { }

  ngOnInit(): void {
    this.loadInventory();
  }

  loadInventory(): void {
    this.inventoryService.getInventoryItems()
      .subscribe(items => this.inventoryItems = items);
  }
}

Security Enhancements
Security is paramount in ERP systems handling sensitive business data. Angular provides robust security features such as built-in cross-site scripting (XSS) protection, strict contextual auto-escaping for templates, and a powerful HTTP client module for secure communication with backend services. Let's integrate authentication and authorization using Angular's router guards in our ERP project.

// Angular router guard for authentication
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { AuthService } from './auth.service';

@Injectable({
  providedIn: 'root'
})
export class AuthGuard implements CanActivate {
  constructor(private authService: AuthService, private router: Router) { }

  canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
    if (this.authService.isAuthenticated()) {
      return true;
    } else {
      this.router.navigate(['/login']);
      return false;
    }
  }
}

Performance Improvements
Angular's latest versions come with performance optimizations such as Ahead-of-Time (AOT) compilation, lazy loading modules, and tree-shaking for efficient bundle sizes. These optimizations ensure smooth user experiences, especially in large-scale ERP applications. Let's leverage Angular's performance improvements by lazy loading modules in our ERP project.

// Angular lazy loading module for improved performance
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  {
    path: 'dashboard',
    loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule)
  },
  {
    path: 'inventory',
    loadChildren: () => import('./inventory/inventory.module').then(m => m.InventoryModule)
  },
  // Other lazy-loaded modules
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

Integration with .NET Core Web Application
Integrating Angular with a .NET Core web application is seamless, thanks to Angular's flexible architecture and .NET Core's robust backend capabilities. You can use ASP.NET Core Web API to provide data services to your Angular frontend. Here's a basic example of how you can set up a .NET Core Web API to serve data to our Angular ERP application.

// .NET Core Web API controller for inventory management
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace ERP.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class InventoryController : ControllerBase
    {
        private readonly InventoryContext _context;

        public InventoryController(InventoryContext context)
        {
            _context = context;
        }

        [HttpGet]
        public ActionResult<IEnumerable<InventoryItem>> Get()
        {
            return _context.InventoryItems.ToList();
        }

        // Other CRUD operations
    }
}

Conclusion

Because of its sophisticated ERP application development features, security upgrades, and speed advantages, Angular is a great option. Through the integration of Angular with.NET Core web apps, developers can fully utilize the capabilities of both platforms to provide safe and efficient ERP systems that are customized to fit the specific requirements of contemporary enterprises.



AngularJS Hosting Europe - HostForLIFE :: How to Getting Started With Angular 18 And Create A Small Application?

clock April 1, 2024 07:27 by author Peter

Angular team will release the latest version of Angular on May 20, 2024.

Now, we can create a new Angular 18 application.
ng new Angular18Galaxy

Compared to the older version project creation is very fast in Angular 18.

As you can see, Angular 18 has relatively small bundle sizes. The performance of the application will be enhanced.

Currently I am getting one issue while running the application.

Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f optimized info should be defined
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:25 pm [vite] Pre-transform error: Failed to load url D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/node_modules/vite/dist/client/env.mjs (resolved id: D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/node_modules/vite/dist/client/env.mjs) in D:/Work/Community/C. Does the
file exist?
ERROR RuntimeError: NG04002: Cannot match any routes. URL Segment: '@fs/D:/Work/Community/C'
    at Recognizer.noMatchError (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2702:12)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2734:20)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:1729:33)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:822:9)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24) {
  code: 4002
}
ERROR RuntimeError: NG04002: Cannot match any routes. URL Segment: '@id/D:/Work/Community/C'
    at Recognizer.noMatchError (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2702:12)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2734:20)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:1729:33)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:822:9)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24) {
  code: 4002
}


Hope Angular team will resolve this issue sooner.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in