Skip to content

Commit 2aeb885

Browse files
author
miladchamo
committed
Angular2-Webpack-VS2015-Intro Sample
Setting up Angular 2 webpack in VS 2015, based on the angular.io webpack intro docs, which can be found at https://angular.io/docs/ts/latest/guide/webpack.html. It appears that the documentation is currently incorrect
1 parent 8d907a2 commit 2aeb885

File tree

83 files changed

+22489
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+22489
-0
lines changed

App_Start/RouteConfig.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace test.app3.angular
9+
{
10+
public class RouteConfig
11+
{
12+
public static void RegisterRoutes(RouteCollection routes)
13+
{
14+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15+
16+
routes.MapRoute(
17+
name: "Default",
18+
url: "{controller}/{action}/{id}",
19+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20+
);
21+
}
22+
}
23+
}

Global.asax

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="test.app3.angular.MvcApplication" Language="C#" %>

Global.asax.cs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace test.app3.angular
9+
{
10+
public class MvcApplication : System.Web.HttpApplication
11+
{
12+
protected void Application_Start()
13+
{
14+
AreaRegistration.RegisterAllAreas();
15+
RouteConfig.RegisterRoutes(RouteTable.Routes);
16+
}
17+
}
18+
}

Properties/AssemblyInfo.cs

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("test.app3.angular")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("test.app3.angular")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("72a3f8b1-46bd-4a4e-b4c1-1366e3b6a412")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

Views/web.config

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0"?>
2+
3+
<configuration>
4+
<configSections>
5+
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
6+
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
7+
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
8+
</sectionGroup>
9+
</configSections>
10+
11+
<system.web.webPages.razor>
12+
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
13+
<pages pageBaseType="System.Web.Mvc.WebViewPage">
14+
<namespaces>
15+
<add namespace="System.Web.Mvc" />
16+
<add namespace="System.Web.Mvc.Ajax" />
17+
<add namespace="System.Web.Mvc.Html" />
18+
<add namespace="System.Web.Routing" />
19+
<add namespace="test.app3.angular" />
20+
</namespaces>
21+
</pages>
22+
</system.web.webPages.razor>
23+
24+
<appSettings>
25+
<add key="webpages:Enabled" value="false" />
26+
</appSettings>
27+
28+
<system.webServer>
29+
<handlers>
30+
<remove name="BlockViewHandler"/>
31+
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
32+
</handlers>
33+
</system.webServer>
34+
35+
<system.web>
36+
<compilation>
37+
<assemblies>
38+
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
39+
</assemblies>
40+
</compilation>
41+
</system.web>
42+
</configuration>

Web.Debug.config

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>

Web.Release.config

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<compilation xdt:Transform="RemoveAttributes(debug)" />
19+
<!--
20+
In the example below, the "Replace" transform will replace the entire
21+
<customErrors> section of your web.config file.
22+
Note that because there is only one customErrors section under the
23+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
24+
25+
<customErrors defaultRedirect="GenericError.htm"
26+
mode="RemoteOnly" xdt:Transform="Replace">
27+
<error statusCode="500" redirect="InternalError.htm"/>
28+
</customErrors>
29+
-->
30+
</system.web>
31+
</configuration>

Web.config

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
For more information on how to configure your ASP.NET application, please visit
4+
http://go.microsoft.com/fwlink/?LinkId=301880
5+
-->
6+
<configuration>
7+
<appSettings>
8+
<add key="webpages:Version" value="3.0.0.0"/>
9+
<add key="webpages:Enabled" value="false"/>
10+
<add key="ClientValidationEnabled" value="true"/>
11+
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
12+
</appSettings>
13+
<system.web>
14+
<compilation debug="true" targetFramework="4.5.2"/>
15+
<httpRuntime targetFramework="4.5.2"/>
16+
</system.web>
17+
<runtime>
18+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
19+
<dependentAssembly>
20+
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
21+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
22+
</dependentAssembly>
23+
<dependentAssembly>
24+
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
25+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
26+
</dependentAssembly>
27+
<dependentAssembly>
28+
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
29+
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
30+
</dependentAssembly>
31+
</assemblyBinding>
32+
</runtime>
33+
<system.codedom>
34+
<compilers>
35+
<compiler language="c#;cs;csharp" extension=".cs"
36+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
37+
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
38+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
39+
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
40+
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
41+
</compilers>
42+
</system.codedom>
43+
</configuration>
Binary file not shown.

bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml

+40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/Microsoft.Web.Infrastructure.dll

44.4 KB
Binary file not shown.

bin/System.Web.Helpers.dll

137 KB
Binary file not shown.

0 commit comments

Comments
 (0)