Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions App_Start/BundleConfig.cs

This file was deleted.

23 changes: 0 additions & 23 deletions App_Start/RouteConfig.cs

This file was deleted.

16 changes: 6 additions & 10 deletions Controllers/LandingController.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace asp_net_angularjs.Controllers
{
public class LandingController : Controller
{
public ActionResult Index()
public class LandingController : Controller
{
return View();
public IActionResult Index()
{
return View();
}
}
}
}
1 change: 0 additions & 1 deletion Global.asax

This file was deleted.

16 changes: 0 additions & 16 deletions Global.asax.cs

This file was deleted.

36 changes: 36 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Microsoft.Extensions.FileProviders;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllersWithViews();

var app = builder.Build();

if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "WebApp")),
RequestPath = "/WebApp"
});

app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "node_modules")),
RequestPath = "/node_modules"
});

app.UseRouting();

app.MapControllerRoute(
name: "default",
pattern: "{controller=Landing}/{action=Index}/{id?}");

app.Run();
15 changes: 10 additions & 5 deletions Views/Landing/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

@using System.Web.Optimization
@{
Layout = null;
}
Expand All @@ -11,15 +10,21 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<title>XLTS for AngularJS with .NET Framework</title>
<title>XLTS for AngularJS with .NET 7</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
@Styles.Render("~/bundles/styles")
@Scripts.Render("~/bundles/scripts")
<link rel="stylesheet" href="~/Content/site.css" />
<link rel="stylesheet" href="~/WebApp/Components/test.component.css" />
<link rel="stylesheet" href="~/WebApp/Directives/test.directive.css" />
<script src="~/node_modules/jquery/dist/jquery.min.js"></script>
<script src="~/node_modules/angular/angular.min.js"></script>
<script src="~/WebApp/app.js"></script>
<script src="~/WebApp/Components/test.component.js"></script>
<script src="~/WebApp/Directives/test.directive.js"></script>
</head>
<body ng-app="app">
<h1 data-testid="title">XLTS for AngularJS with .NET Framework</h1>
<h1 data-testid="title">XLTS for AngularJS with .NET 7</h1>
<test-directive></test-directive>
<test-component></test-component>
</body>
Expand Down
42 changes: 0 additions & 42 deletions Views/web.config

This file was deleted.

47 changes: 0 additions & 47 deletions Web.config

This file was deleted.

Loading