Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a545658
Showing
15 changed files
with
228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
Thumbs.db | ||
.vs/ | ||
bin/ | ||
obj/ | ||
node_modules/ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26228.10 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWebsite", "MyWebsite\MyWebsite.csproj", "{CE02962B-3EB1-4E29-B676-09510FAF86B6}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{CE02962B-3EB1-4E29-B676-09510FAF86B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{CE02962B-3EB1-4E29-B676-09510FAF86B6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{CE02962B-3EB1-4E29-B676-09510FAF86B6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{CE02962B-3EB1-4E29-B676-09510FAF86B6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.1</TargetFramework> | ||
<Authors>John Wu</Authors> | ||
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance> | ||
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon> | ||
<Copyright>Copyright © 2017 John Wu</Copyright> | ||
<Description>This is example for ASP.NET Core from blog.johnwu.cc</Description> | ||
<Company /> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="wwwroot\app\app.component.html" /> | ||
<Content Include="wwwroot\app\app.component.ts" /> | ||
<Content Include="wwwroot\app\main.ts" /> | ||
<Content Include="wwwroot\favicon.ico" /> | ||
<Content Include="wwwroot\index.html" /> | ||
<Content Include="wwwroot\systemjs.config.js" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.AspNetCore.Hosting; | ||
using System.IO; | ||
|
||
namespace MyWebsite | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
var host = new WebHostBuilder() | ||
.UseKestrel() | ||
.UseContentRoot(Directory.GetCurrentDirectory()) | ||
.UseIISIntegration() | ||
.UseStartup<Startup>() | ||
.UseApplicationInsights() | ||
.Build(); | ||
|
||
host.Run(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:33333/", | ||
"sslPort": 0 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.Extensions.FileProviders; | ||
using System.IO; | ||
|
||
namespace MyWebsite | ||
{ | ||
public class Startup | ||
{ | ||
public void Configure(IApplicationBuilder app) | ||
{ | ||
app.UseDefaultFiles(); | ||
app.UseStaticFiles(); | ||
app.UseStaticFiles(new StaticFileOptions() | ||
{ | ||
FileProvider = new PhysicalFileProvider( | ||
Path.Combine(Directory.GetCurrentDirectory(), @"node_modules")), | ||
RequestPath = new PathString("/node_modules") | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "my-website", | ||
"version": "1.0.0", | ||
"description": "This is example for Angular 4 from blog.johnwu.cc", | ||
"dependencies": { | ||
"@angular/common": "4.0.2", | ||
"@angular/compiler": "4.0.2", | ||
"@angular/core": "4.0.2", | ||
"@angular/forms": "4.0.2", | ||
"@angular/http": "4.0.2", | ||
"@angular/platform-browser": "4.0.2", | ||
"@angular/platform-browser-dynamic": "4.0.2", | ||
"@angular/router": "4.0.2", | ||
"core-js": "2.4.1", | ||
"rxjs": "5.3.0", | ||
"systemjs": "0.20.12", | ||
"zone.js": "0.8.5" | ||
}, | ||
"devDependencies": { | ||
"@types/jasmine": "2.5.47", | ||
"@types/node": "7.0.12", | ||
"typescript": "2.2.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compileOnSave": true, | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"lib": [ "es2015", "dom" ], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"sourceMap": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"target": "es5" | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.js | ||
*.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Hello {{name}}</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "my-app", | ||
templateUrl: "/app/app.component.html" | ||
}) | ||
export class AppComponent { | ||
name = "Angular 4"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; | ||
import { NgModule } from "@angular/core"; | ||
import { BrowserModule } from "@angular/platform-browser"; | ||
import { AppComponent } from "./app.component"; | ||
|
||
@NgModule({ | ||
imports: [BrowserModule], | ||
declarations: [AppComponent], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>MyWebsite</title> | ||
<base href="/"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script src="/node_modules/core-js/client/shim.min.js"></script> | ||
<script src="/node_modules/zone.js/dist/zone.js"></script> | ||
<script src="/node_modules/systemjs/dist/system.src.js"></script> | ||
<script src="/systemjs.config.js"></script> | ||
<script> | ||
System.import('/app/main.js').catch(function (err) { console.error(err); }); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<my-app>Loading AppComponent content here ...</my-app> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(function (global) { | ||
System.config({ | ||
paths: { | ||
"npm:": "node_modules/" | ||
}, | ||
map: { | ||
"app": "app", | ||
"@angular/core": "npm:@angular/core/bundles/core.umd.js", | ||
"@angular/common": "npm:@angular/common/bundles/common.umd.js", | ||
"@angular/compiler": "npm:@angular/compiler/bundles/compiler.umd.js", | ||
"@angular/platform-browser": "npm:@angular/platform-browser/bundles/platform-browser.umd.js", | ||
"@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js", | ||
"@angular/http": "npm:@angular/http/bundles/http.umd.js", | ||
"@angular/router": "npm:@angular/router/bundles/router.umd.js", | ||
"@angular/forms": "npm:@angular/forms/bundles/forms.umd.js", | ||
"rxjs": "npm:rxjs", | ||
}, | ||
packages: { | ||
app: { | ||
defaultExtension: "js", | ||
}, | ||
rxjs: { | ||
defaultExtension: "js" | ||
} | ||
} | ||
}); | ||
})(this); |