├── .gitignore ├── LICENSE ├── MyAngular2BaseApp.sln ├── README.md ├── global.json └── src └── MyAngular2BaseApp ├── .bowerrc ├── Controllers └── HomeController.cs ├── MyAngular2BaseApp.xproj ├── Properties └── launchSettings.json ├── Startup.cs ├── Views ├── Home │ └── Index.cshtml ├── Shared │ ├── Error.cshtml │ └── _Layout.cshtml ├── _ViewImports.cshtml └── _ViewStart.cshtml ├── appsettings.json ├── bower.json ├── gulpfile.js ├── package.json ├── project.json ├── ts └── es6-shim.d.ts ├── tsconfig.json └── wwwroot ├── _references.js ├── app ├── app.component.ts └── boot.ts ├── css └── site.css ├── favicon.ico ├── images └── ASP-NET-Banners-01.png ├── js └── site.js └── web.config /.gitignore: -------------------------------------------------------------------------------- 1 | ## App specific excludes 2 | src/*/wwwroot/lib/ 3 | src/*/wwwroot/app/*.js 4 | src/*/wwwroot/app/*.js.map 5 | src/*/wwwroot/js/*.min.js 6 | src/*/wwwroot/js/*.js.map 7 | src/*/wwwroot/css/*.min.css 8 | 9 | ## Ignore Visual Studio temporary files, build results, and 10 | ## files generated by popular Visual Studio add-ons. 11 | 12 | # User-specific files 13 | *.suo 14 | *.user 15 | *.userosscache 16 | *.sln.docstates 17 | 18 | # User-specific files (MonoDevelop/Xamarin Studio) 19 | *.userprefs 20 | 21 | # Build results 22 | [Dd]ebug/ 23 | [Dd]ebugPublic/ 24 | [Rr]elease/ 25 | [Rr]eleases/ 26 | x64/ 27 | x86/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | 32 | # Visual Studio 2015 cache/options directory 33 | .vs/ 34 | # Uncomment if you have tasks that create the project's static files in wwwroot 35 | #wwwroot/ 36 | 37 | # MSTest test Results 38 | [Tt]est[Rr]esult*/ 39 | [Bb]uild[Ll]og.* 40 | 41 | # NUNIT 42 | *.VisualState.xml 43 | TestResult.xml 44 | 45 | # Build Results of an ATL Project 46 | [Dd]ebugPS/ 47 | [Rr]eleasePS/ 48 | dlldata.c 49 | 50 | # DNX 51 | project.lock.json 52 | artifacts/ 53 | 54 | *_i.c 55 | *_p.c 56 | *_i.h 57 | *.ilk 58 | *.meta 59 | *.obj 60 | *.pch 61 | *.pdb 62 | *.pgc 63 | *.pgd 64 | *.rsp 65 | *.sbr 66 | *.tlb 67 | *.tli 68 | *.tlh 69 | *.tmp 70 | *.tmp_proj 71 | *.log 72 | *.vspscc 73 | *.vssscc 74 | .builds 75 | *.pidb 76 | *.svclog 77 | *.scc 78 | 79 | # Chutzpah Test files 80 | _Chutzpah* 81 | 82 | # Visual C++ cache files 83 | ipch/ 84 | *.aps 85 | *.ncb 86 | *.opendb 87 | *.opensdf 88 | *.sdf 89 | *.cachefile 90 | 91 | # Visual Studio profiler 92 | *.psess 93 | *.vsp 94 | *.vspx 95 | *.sap 96 | 97 | # TFS 2012 Local Workspace 98 | $tf/ 99 | 100 | # Guidance Automation Toolkit 101 | *.gpState 102 | 103 | # ReSharper is a .NET coding add-in 104 | _ReSharper*/ 105 | *.[Rr]e[Ss]harper 106 | *.DotSettings.user 107 | 108 | # JustCode is a .NET coding add-in 109 | .JustCode 110 | 111 | # TeamCity is a build add-in 112 | _TeamCity* 113 | 114 | # DotCover is a Code Coverage Tool 115 | *.dotCover 116 | 117 | # NCrunch 118 | _NCrunch_* 119 | .*crunch*.local.xml 120 | nCrunchTemp_* 121 | 122 | # MightyMoose 123 | *.mm.* 124 | AutoTest.Net/ 125 | 126 | # Web workbench (sass) 127 | .sass-cache/ 128 | 129 | # Installshield output folder 130 | [Ee]xpress/ 131 | 132 | # DocProject is a documentation generator add-in 133 | DocProject/buildhelp/ 134 | DocProject/Help/*.HxT 135 | DocProject/Help/*.HxC 136 | DocProject/Help/*.hhc 137 | DocProject/Help/*.hhk 138 | DocProject/Help/*.hhp 139 | DocProject/Help/Html2 140 | DocProject/Help/html 141 | 142 | # Click-Once directory 143 | publish/ 144 | 145 | # Publish Web Output 146 | *.[Pp]ublish.xml 147 | *.azurePubxml 148 | # TODO: Comment the next line if you want to checkin your web deploy settings 149 | # but database connection strings (with potential passwords) will be unencrypted 150 | *.pubxml 151 | *.publishproj 152 | 153 | # NuGet Packages 154 | *.nupkg 155 | # The packages folder can be ignored because of Package Restore 156 | **/packages/* 157 | # except build/, which is used as an MSBuild target. 158 | !**/packages/build/ 159 | # Uncomment if necessary however generally it will be regenerated when needed 160 | #!**/packages/repositories.config 161 | # NuGet v3's project.json files produces more ignoreable files 162 | *.nuget.props 163 | *.nuget.targets 164 | 165 | # Microsoft Azure Build Output 166 | csx/ 167 | *.build.csdef 168 | 169 | # Microsoft Azure Emulator 170 | ecf/ 171 | rcf/ 172 | 173 | # Microsoft Azure ApplicationInsights config file 174 | ApplicationInsights.config 175 | 176 | # Windows Store app package directory 177 | AppPackages/ 178 | BundleArtifacts/ 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.pfx 193 | *.publishsettings 194 | node_modules/ 195 | orleans.codegen.cs 196 | 197 | # RIA/Silverlight projects 198 | Generated_Code/ 199 | 200 | # Backup & report files from converting an old project file 201 | # to a newer Visual Studio version. Backup files are not needed, 202 | # because we have git ;-) 203 | _UpgradeReport_Files/ 204 | Backup*/ 205 | UpgradeLog*.XML 206 | UpgradeLog*.htm 207 | 208 | # SQL Server files 209 | *.mdf 210 | *.ldf 211 | 212 | # Business Intelligence projects 213 | *.rdl.data 214 | *.bim.layout 215 | *.bim_*.settings 216 | 217 | # Microsoft Fakes 218 | FakesAssemblies/ 219 | 220 | # GhostDoc plugin setting file 221 | *.GhostDoc.xml 222 | 223 | # Node.js Tools for Visual Studio 224 | .ntvs_analysis.dat 225 | 226 | # Visual Studio 6 build log 227 | *.plg 228 | 229 | # Visual Studio 6 workspace options file 230 | *.opt 231 | 232 | # Visual Studio LightSwitch build output 233 | **/*.HTMLClient/GeneratedArtifacts 234 | **/*.DesktopClient/GeneratedArtifacts 235 | **/*.DesktopClient/ModelManifest.xml 236 | **/*.Server/GeneratedArtifacts 237 | **/*.Server/ModelManifest.xml 238 | _Pvt_Extensions 239 | 240 | # Paket dependency manager 241 | .paket/paket.exe 242 | 243 | # FAKE - F# Make 244 | .fake/ 245 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Nicolás Bello Camilletti 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MyAngular2BaseApp.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FFC573C7-0937-49C2-BBFA-EB690E2FDBC8}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{96AD2170-3ACC-4F6B-9E5D-E4A0FDDCDC58}" 9 | ProjectSection(SolutionItems) = preProject 10 | global.json = global.json 11 | EndProjectSection 12 | EndProject 13 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MyAngular2BaseApp", "src\MyAngular2BaseApp\MyAngular2BaseApp.xproj", "{1B95BC6F-073F-4E97-9924-760D5021DE92}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {1B95BC6F-073F-4E97-9924-760D5021DE92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {1B95BC6F-073F-4E97-9924-760D5021DE92}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {1B95BC6F-073F-4E97-9924-760D5021DE92}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {1B95BC6F-073F-4E97-9924-760D5021DE92}.Release|Any CPU.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(NestedProjects) = preSolution 30 | {1B95BC6F-073F-4E97-9924-760D5021DE92} = {FFC573C7-0937-49C2-BBFA-EB690E2FDBC8} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ASP.NET Core with Angular 2 Base App 2 | 3 | Base ASP.NET Core project with Angular 2 and TypeScript build-in. You can find more information on [my post](http://blog.nbellocam.me/2016/03/14/asp-net-core-and-angular-2/). 4 | 5 | ## Creating the base structure for this kind of project 6 | 7 | In order to easily recreate this structure, you can follow the commits in this repository. Each commit shows a step to configure the base structure for this kind of project. 8 | 9 | 1. Create your _ASP.NET Core_ project with MVC: [79174d9](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/79174d9211706ff0f7f9ba1d789a3e3670b690ad) 10 | 2. Add _Angular 2_ dependencies to your _package.json_: [452a86e](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/452a86ef7b0f513f075877566485039eb322c907) 11 | 3. Add _Gulp_ tasks to copy the _Angular 2_ dependencies to the _wwwroot_ folder: [1d2a6f1](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/1d2a6f1cfcf4212191d79a99fb2937d984c0e3e2) 12 | 4. Update layout to include _Angular 2_ dependencies: [d276963](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/d276963230e113399aa5b29d204278881f3abf9a). Minor path fix by [@mikekidder](http://github.com/mikekidder): [2b92f08](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/2b92f08661710507f3c6922ce4b3badf8a4125a2) 13 | 5. Add _TypeScript_ configuration file: [bbd1842](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/bbd1842e47905e4236b83415901479272b94ddc3) 14 | 6. Add _es6-shim_'s TypeScript definitions: [fdbd2f3](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/fdbd2f3e8f969f55fe9ef176f1d44028d31941aa) 15 | 7. Add _app.component.ts_ file with the sample AppComponent: [0e9567f](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/0e9567fb93143ae38f4d742aeff9b5c1491ad884) 16 | 8. Add _boot.ts_ with the bootstrap of the _Angular 2_ application: [051a0a2](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/051a0a27b6c8aacbd01130d394d235c6d782aa31) 17 | 9. Update index page with the logic to initialize the _Angular 2_ application: [514ce93](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/commit/514ce9333341f121477e7e24792780b66e355f8f) 18 | 19 | 20 | ## Adding routing suport to your Angular application 21 | 22 | To keep this sample simple and include the feedback and code from [@BradRem](http://github.com/BradRem), I added a new branch named [routing-sample](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/tree/routing-sample) with the base structure for Angular 2 routing. 23 | 24 | ## Adding http suport to your Angular application 25 | 26 | I added a new branch named [http-sample](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/tree/http-sample) with the base structure for using the HTTP service in Angular 2 to consume an ASP.NET Core API. 27 | 28 | ## Full sample (with routing and http) 29 | 30 | You can find the full solution with Angular 2 configured to use HTTP and Route components in an ASP.NET Core application in Visual Studio in the [full-sample](https://github.com/nbellocam/Angular2ASPNETCoreBaseApp/tree/full-sample) branch. 31 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test" ], 3 | "sdk": { 4 | "version": "1.0.0-rc1-update1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | namespace MyAngular2BaseApp.Controllers 2 | { 3 | using Microsoft.AspNet.Mvc; 4 | 5 | public class HomeController : Controller 6 | { 7 | public IActionResult Index() 8 | { 9 | return View(); 10 | } 11 | 12 | public IActionResult Error() 13 | { 14 | return View(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/MyAngular2BaseApp.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 1b95bc6f-073f-4e97-9924-760d5021de92 10 | MyAngular2BaseApp 11 | ..\..\artifacts\obj\$(MSBuildProjectName) 12 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:1954/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "Hosting:Environment": "Development" 16 | } 17 | }, 18 | "web": { 19 | "commandName": "web", 20 | "environmentVariables": { 21 | "Hosting:Environment": "Development" 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Startup.cs: -------------------------------------------------------------------------------- 1 | namespace MyAngular2BaseApp 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNet.Builder; 8 | using Microsoft.AspNet.Hosting; 9 | using Microsoft.Extensions.Configuration; 10 | using Microsoft.Extensions.DependencyInjection; 11 | using Microsoft.Extensions.Logging; 12 | 13 | public class Startup 14 | { 15 | public Startup(IHostingEnvironment env) 16 | { 17 | // Set up configuration sources. 18 | var builder = new ConfigurationBuilder() 19 | .AddJsonFile("appsettings.json") 20 | .AddEnvironmentVariables(); 21 | Configuration = builder.Build(); 22 | } 23 | 24 | public IConfigurationRoot Configuration { get; set; } 25 | 26 | // This method gets called by the runtime. Use this method to add services to the container. 27 | public void ConfigureServices(IServiceCollection services) 28 | { 29 | // Add framework services. 30 | services.AddMvc(); 31 | } 32 | 33 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 34 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) 35 | { 36 | loggerFactory.AddConsole(Configuration.GetSection("Logging")); 37 | loggerFactory.AddDebug(); 38 | 39 | if (env.IsDevelopment()) 40 | { 41 | app.UseBrowserLink(); 42 | app.UseDeveloperExceptionPage(); 43 | } 44 | else 45 | { 46 | app.UseExceptionHandler("/Home/Error"); 47 | } 48 | 49 | app.UseIISPlatformHandler(); 50 | 51 | app.UseStaticFiles(); 52 | 53 | app.UseMvc(routes => 54 | { 55 | routes.MapRoute( 56 | name: "default", 57 | template: "{controller=Home}/{action=Index}/{id?}"); 58 | }); 59 | } 60 | 61 | // Entry point for the application. 62 | public static void Main(string[] args) => WebApplication.Run(args); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | 10 | Loading... 11 | 12 | 13 | 14 | 15 | 16 | 17 | @section Scripts { 18 | 29 | } -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 | Error. 6 | An error occurred while processing your request. 7 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - MyAngular2BaseApp 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Toggle navigation 45 | 46 | 47 | 48 | 49 | MyAngular2BaseApp 50 | 51 | 52 | 53 | Home 54 | 55 | 56 | 57 | 58 | 59 | @RenderBody() 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 76 | 80 | 81 | 82 | 83 | @RenderSection("scripts", required: false) 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using MyAngular2BaseApp 2 | @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" 3 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ASP.NET", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.3.5", 6 | "jquery": "2.1.4", 7 | "jquery-validation": "1.14.0", 8 | "jquery-validation-unobtrusive": "3.2.4" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/gulpfile.js: -------------------------------------------------------------------------------- 1 | /// 2 | "use strict"; 3 | 4 | var gulp = require("gulp"), 5 | rimraf = require("rimraf"), 6 | concat = require("gulp-concat"), 7 | cssmin = require("gulp-cssmin"), 8 | uglify = require("gulp-uglify"); 9 | 10 | var paths = { 11 | webroot: "./wwwroot/" 12 | }; 13 | 14 | paths.js = paths.webroot + "js/**/*.js"; 15 | paths.minJs = paths.webroot + "js/**/*.min.js"; 16 | paths.css = paths.webroot + "css/**/*.css"; 17 | paths.minCss = paths.webroot + "css/**/*.min.css"; 18 | paths.concatJsDest = paths.webroot + "js/site.min.js"; 19 | paths.concatCssDest = paths.webroot + "css/site.min.css"; 20 | paths.npmSrc = "./node_modules/"; 21 | paths.npmLibs = paths.webroot + "lib/npmlibs/"; 22 | 23 | gulp.task("clean:js", function (cb) { 24 | rimraf(paths.concatJsDest, cb); 25 | }); 26 | 27 | gulp.task("clean:css", function (cb) { 28 | rimraf(paths.concatCssDest, cb); 29 | }); 30 | 31 | gulp.task("clean", ["clean:js", "clean:css"]); 32 | 33 | gulp.task("min:js", function () { 34 | return gulp.src([paths.js, "!" + paths.minJs], { base: "." }) 35 | .pipe(concat(paths.concatJsDest)) 36 | .pipe(uglify()) 37 | .pipe(gulp.dest(".")); 38 | }); 39 | 40 | gulp.task("min:css", function () { 41 | return gulp.src([paths.css, "!" + paths.minCss]) 42 | .pipe(concat(paths.concatCssDest)) 43 | .pipe(cssmin()) 44 | .pipe(gulp.dest(".")); 45 | }); 46 | 47 | gulp.task("min", ["min:js", "min:css"]); 48 | 49 | gulp.task("copy-deps:systemjs", function () { 50 | return gulp.src(paths.npmSrc + '/systemjs/dist/**/*.*', { base: paths.npmSrc + '/systemjs/dist/' }) 51 | .pipe(gulp.dest(paths.npmLibs + '/systemjs/')); 52 | }); 53 | 54 | gulp.task("copy-deps:angular2", function () { 55 | return gulp.src(paths.npmSrc + '/angular2/bundles/**/*.js', { base: paths.npmSrc + '/angular2/bundles/' }) 56 | .pipe(gulp.dest(paths.npmLibs + '/angular2/')); 57 | }); 58 | 59 | gulp.task("copy-deps:es6-shim", function () { 60 | return gulp.src(paths.npmSrc + '/es6-shim/es6-sh*', { base: paths.npmSrc + '/es6-shim/' }) 61 | .pipe(gulp.dest(paths.npmLibs + '/es6-shim/')); 62 | }); 63 | 64 | gulp.task("copy-deps:rxjs", function () { 65 | return gulp.src(paths.npmSrc + '/rxjs/bundles/*.*', { base: paths.npmSrc + '/rxjs/bundles/' }) 66 | .pipe(gulp.dest(paths.npmLibs + '/rxjs/')); 67 | }); 68 | 69 | gulp.task("copy-deps", ["copy-deps:rxjs", 'copy-deps:angular2', 'copy-deps:systemjs', 'copy-deps:es6-shim']); -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ASP.NET", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "angular2": "2.0.0-beta.9", 6 | "systemjs": "0.19.24", 7 | "es6-shim": "^0.33.3", 8 | "rxjs": "5.0.0-beta.2" 9 | }, 10 | "devDependencies": { 11 | "gulp": "3.8.11", 12 | "gulp-concat": "2.5.2", 13 | "gulp-cssmin": "0.1.7", 14 | "gulp-uglify": "1.2.0", 15 | "rimraf": "2.2.8" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final", 9 | "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", 10 | "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", 11 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", 12 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 13 | "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", 14 | "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final", 15 | "Microsoft.Extensions.Configuration.FileProviderExtensions" : "1.0.0-rc1-final", 16 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", 17 | "Microsoft.Extensions.Logging": "1.0.0-rc1-final", 18 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", 19 | "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", 20 | "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final" 21 | }, 22 | 23 | "commands": { 24 | "web": "Microsoft.AspNet.Server.Kestrel" 25 | }, 26 | 27 | "frameworks": { 28 | "dnx451": { }, 29 | "dnxcore50": { } 30 | }, 31 | 32 | "exclude": [ 33 | "wwwroot", 34 | "node_modules" 35 | ], 36 | "publishExclude": [ 37 | "**.user", 38 | "**.vspscc" 39 | ], 40 | "scripts": { 41 | "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ] 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/ts/es6-shim.d.ts: -------------------------------------------------------------------------------- 1 | // Type definitions for es6-shim v0.31.2 2 | // Project: https://github.com/paulmillr/es6-shim 3 | // Definitions by: Ron Buckton 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped 5 | 6 | declare type PropertyKey = string | number | symbol; 7 | 8 | interface IteratorResult { 9 | done: boolean; 10 | value?: T; 11 | } 12 | 13 | interface IterableShim { 14 | /** 15 | * Shim for an ES6 iterable. Not intended for direct use by user code. 16 | */ 17 | "_es6-shim iterator_"(): Iterator; 18 | } 19 | 20 | interface Iterator { 21 | next(value?: any): IteratorResult; 22 | return?(value?: any): IteratorResult; 23 | throw?(e?: any): IteratorResult; 24 | } 25 | 26 | interface IterableIteratorShim extends IterableShim, Iterator { 27 | /** 28 | * Shim for an ES6 iterable iterator. Not intended for direct use by user code. 29 | */ 30 | "_es6-shim iterator_"(): IterableIteratorShim; 31 | } 32 | 33 | interface StringConstructor { 34 | /** 35 | * Return the String value whose elements are, in order, the elements in the List elements. 36 | * If length is 0, the empty string is returned. 37 | */ 38 | fromCodePoint(...codePoints: number[]): string; 39 | 40 | /** 41 | * String.raw is intended for use as a tag function of a Tagged Template String. When called 42 | * as such the first argument will be a well formed template call site object and the rest 43 | * parameter will contain the substitution values. 44 | * @param template A well-formed template string call site representation. 45 | * @param substitutions A set of substitution values. 46 | */ 47 | raw(template: TemplateStringsArray, ...substitutions: any[]): string; 48 | } 49 | 50 | interface String { 51 | /** 52 | * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point 53 | * value of the UTF-16 encoded code point starting at the string element at position pos in 54 | * the String resulting from converting this object to a String. 55 | * If there is no element at that position, the result is undefined. 56 | * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos. 57 | */ 58 | codePointAt(pos: number): number; 59 | 60 | /** 61 | * Returns true if searchString appears as a substring of the result of converting this 62 | * object to a String, at one or more positions that are 63 | * greater than or equal to position; otherwise, returns false. 64 | * @param searchString search string 65 | * @param position If position is undefined, 0 is assumed, so as to search all of the String. 66 | */ 67 | includes(searchString: string, position?: number): boolean; 68 | 69 | /** 70 | * Returns true if the sequence of elements of searchString converted to a String is the 71 | * same as the corresponding elements of this object (converted to a String) starting at 72 | * endPosition – length(this). Otherwise returns false. 73 | */ 74 | endsWith(searchString: string, endPosition?: number): boolean; 75 | 76 | /** 77 | * Returns a String value that is made from count copies appended together. If count is 0, 78 | * T is the empty String is returned. 79 | * @param count number of copies to append 80 | */ 81 | repeat(count: number): string; 82 | 83 | /** 84 | * Returns true if the sequence of elements of searchString converted to a String is the 85 | * same as the corresponding elements of this object (converted to a String) starting at 86 | * position. Otherwise returns false. 87 | */ 88 | startsWith(searchString: string, position?: number): boolean; 89 | 90 | /** 91 | * Returns an HTML anchor element and sets the name attribute to the text value 92 | * @param name 93 | */ 94 | anchor(name: string): string; 95 | 96 | /** Returns a HTML element */ 97 | big(): string; 98 | 99 | /** Returns a HTML element */ 100 | blink(): string; 101 | 102 | /** Returns a HTML element */ 103 | bold(): string; 104 | 105 | /** Returns a HTML element */ 106 | fixed(): string 107 | 108 | /** Returns a HTML element and sets the color attribute value */ 109 | fontcolor(color: string): string 110 | 111 | /** Returns a HTML element and sets the size attribute value */ 112 | fontsize(size: number): string; 113 | 114 | /** Returns a HTML element and sets the size attribute value */ 115 | fontsize(size: string): string; 116 | 117 | /** Returns an HTML element */ 118 | italics(): string; 119 | 120 | /** Returns an HTML element and sets the href attribute value */ 121 | link(url: string): string; 122 | 123 | /** Returns a HTML element */ 124 | small(): string; 125 | 126 | /** Returns a HTML element */ 127 | strike(): string; 128 | 129 | /** Returns a HTML element */ 130 | sub(): string; 131 | 132 | /** Returns a HTML element */ 133 | sup(): string; 134 | 135 | /** 136 | * Shim for an ES6 iterable. Not intended for direct use by user code. 137 | */ 138 | "_es6-shim iterator_"(): IterableIteratorShim; 139 | } 140 | 141 | interface ArrayConstructor { 142 | /** 143 | * Creates an array from an array-like object. 144 | * @param arrayLike An array-like object to convert to an array. 145 | * @param mapfn A mapping function to call on every element of the array. 146 | * @param thisArg Value of 'this' used to invoke the mapfn. 147 | */ 148 | from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 149 | 150 | /** 151 | * Creates an array from an iterable object. 152 | * @param iterable An iterable object to convert to an array. 153 | * @param mapfn A mapping function to call on every element of the array. 154 | * @param thisArg Value of 'this' used to invoke the mapfn. 155 | */ 156 | from(iterable: IterableShim, mapfn: (v: T, k: number) => U, thisArg?: any): Array; 157 | 158 | /** 159 | * Creates an array from an array-like object. 160 | * @param arrayLike An array-like object to convert to an array. 161 | */ 162 | from(arrayLike: ArrayLike): Array; 163 | 164 | /** 165 | * Creates an array from an iterable object. 166 | * @param iterable An iterable object to convert to an array. 167 | */ 168 | from(iterable: IterableShim): Array; 169 | 170 | /** 171 | * Returns a new array from a set of elements. 172 | * @param items A set of elements to include in the new array object. 173 | */ 174 | of(...items: T[]): Array; 175 | } 176 | 177 | interface Array { 178 | /** 179 | * Returns the value of the first element in the array where predicate is true, and undefined 180 | * otherwise. 181 | * @param predicate find calls predicate once for each element of the array, in ascending 182 | * order, until it finds one where predicate returns true. If such an element is found, find 183 | * immediately returns that element value. Otherwise, find returns undefined. 184 | * @param thisArg If provided, it will be used as the this value for each invocation of 185 | * predicate. If it is not provided, undefined is used instead. 186 | */ 187 | find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T; 188 | 189 | /** 190 | * Returns the index of the first element in the array where predicate is true, and undefined 191 | * otherwise. 192 | * @param predicate find calls predicate once for each element of the array, in ascending 193 | * order, until it finds one where predicate returns true. If such an element is found, find 194 | * immediately returns that element value. Otherwise, find returns undefined. 195 | * @param thisArg If provided, it will be used as the this value for each invocation of 196 | * predicate. If it is not provided, undefined is used instead. 197 | */ 198 | findIndex(predicate: (value: T) => boolean, thisArg?: any): number; 199 | 200 | /** 201 | * Returns the this object after filling the section identified by start and end with value 202 | * @param value value to fill array section with 203 | * @param start index to start filling the array at. If start is negative, it is treated as 204 | * length+start where length is the length of the array. 205 | * @param end index to stop filling the array at. If end is negative, it is treated as 206 | * length+end. 207 | */ 208 | fill(value: T, start?: number, end?: number): T[]; 209 | 210 | /** 211 | * Returns the this object after copying a section of the array identified by start and end 212 | * to the same array starting at position target 213 | * @param target If target is negative, it is treated as length+target where length is the 214 | * length of the array. 215 | * @param start If start is negative, it is treated as length+start. If end is negative, it 216 | * is treated as length+end. 217 | * @param end If not specified, length of the this object is used as its default value. 218 | */ 219 | copyWithin(target: number, start: number, end?: number): T[]; 220 | 221 | /** 222 | * Returns an array of key, value pairs for every entry in the array 223 | */ 224 | entries(): IterableIteratorShim<[number, T]>; 225 | 226 | /** 227 | * Returns an list of keys in the array 228 | */ 229 | keys(): IterableIteratorShim; 230 | 231 | /** 232 | * Returns an list of values in the array 233 | */ 234 | values(): IterableIteratorShim; 235 | 236 | /** 237 | * Shim for an ES6 iterable. Not intended for direct use by user code. 238 | */ 239 | "_es6-shim iterator_"(): IterableIteratorShim; 240 | } 241 | 242 | interface NumberConstructor { 243 | /** 244 | * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 245 | * that is representable as a Number value, which is approximately: 246 | * 2.2204460492503130808472633361816 x 10−16. 247 | */ 248 | EPSILON: number; 249 | 250 | /** 251 | * Returns true if passed value is finite. 252 | * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a 253 | * number. Only finite values of the type number, result in true. 254 | * @param number A numeric value. 255 | */ 256 | isFinite(number: number): boolean; 257 | 258 | /** 259 | * Returns true if the value passed is an integer, false otherwise. 260 | * @param number A numeric value. 261 | */ 262 | isInteger(number: number): boolean; 263 | 264 | /** 265 | * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a 266 | * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter 267 | * to a number. Only values of the type number, that are also NaN, result in true. 268 | * @param number A numeric value. 269 | */ 270 | isNaN(number: number): boolean; 271 | 272 | /** 273 | * Returns true if the value passed is a safe integer. 274 | * @param number A numeric value. 275 | */ 276 | isSafeInteger(number: number): boolean; 277 | 278 | /** 279 | * The value of the largest integer n such that n and n + 1 are both exactly representable as 280 | * a Number value. 281 | * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1. 282 | */ 283 | MAX_SAFE_INTEGER: number; 284 | 285 | /** 286 | * The value of the smallest integer n such that n and n − 1 are both exactly representable as 287 | * a Number value. 288 | * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)). 289 | */ 290 | MIN_SAFE_INTEGER: number; 291 | 292 | /** 293 | * Converts a string to a floating-point number. 294 | * @param string A string that contains a floating-point number. 295 | */ 296 | parseFloat(string: string): number; 297 | 298 | /** 299 | * Converts A string to an integer. 300 | * @param s A string to convert into a number. 301 | * @param radix A value between 2 and 36 that specifies the base of the number in numString. 302 | * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. 303 | * All other strings are considered decimal. 304 | */ 305 | parseInt(string: string, radix?: number): number; 306 | } 307 | 308 | interface ObjectConstructor { 309 | /** 310 | * Copy the values of all of the enumerable own properties from one or more source objects to a 311 | * target object. Returns the target object. 312 | * @param target The target object to copy to. 313 | * @param sources One or more source objects to copy properties from. 314 | */ 315 | assign(target: any, ...sources: any[]): any; 316 | 317 | /** 318 | * Returns true if the values are the same value, false otherwise. 319 | * @param value1 The first value. 320 | * @param value2 The second value. 321 | */ 322 | is(value1: any, value2: any): boolean; 323 | 324 | /** 325 | * Sets the prototype of a specified object o to object proto or null. Returns the object o. 326 | * @param o The object to change its prototype. 327 | * @param proto The value of the new prototype or null. 328 | * @remarks Requires `__proto__` support. 329 | */ 330 | setPrototypeOf(o: any, proto: any): any; 331 | } 332 | 333 | interface RegExp { 334 | /** 335 | * Returns a string indicating the flags of the regular expression in question. This field is read-only. 336 | * The characters in this string are sequenced and concatenated in the following order: 337 | * 338 | * - "g" for global 339 | * - "i" for ignoreCase 340 | * - "m" for multiline 341 | * - "u" for unicode 342 | * - "y" for sticky 343 | * 344 | * If no flags are set, the value is the empty string. 345 | */ 346 | flags: string; 347 | } 348 | 349 | interface Math { 350 | /** 351 | * Returns the number of leading zero bits in the 32-bit binary representation of a number. 352 | * @param x A numeric expression. 353 | */ 354 | clz32(x: number): number; 355 | 356 | /** 357 | * Returns the result of 32-bit multiplication of two numbers. 358 | * @param x First number 359 | * @param y Second number 360 | */ 361 | imul(x: number, y: number): number; 362 | 363 | /** 364 | * Returns the sign of the x, indicating whether x is positive, negative or zero. 365 | * @param x The numeric expression to test 366 | */ 367 | sign(x: number): number; 368 | 369 | /** 370 | * Returns the base 10 logarithm of a number. 371 | * @param x A numeric expression. 372 | */ 373 | log10(x: number): number; 374 | 375 | /** 376 | * Returns the base 2 logarithm of a number. 377 | * @param x A numeric expression. 378 | */ 379 | log2(x: number): number; 380 | 381 | /** 382 | * Returns the natural logarithm of 1 + x. 383 | * @param x A numeric expression. 384 | */ 385 | log1p(x: number): number; 386 | 387 | /** 388 | * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of 389 | * the natural logarithms). 390 | * @param x A numeric expression. 391 | */ 392 | expm1(x: number): number; 393 | 394 | /** 395 | * Returns the hyperbolic cosine of a number. 396 | * @param x A numeric expression that contains an angle measured in radians. 397 | */ 398 | cosh(x: number): number; 399 | 400 | /** 401 | * Returns the hyperbolic sine of a number. 402 | * @param x A numeric expression that contains an angle measured in radians. 403 | */ 404 | sinh(x: number): number; 405 | 406 | /** 407 | * Returns the hyperbolic tangent of a number. 408 | * @param x A numeric expression that contains an angle measured in radians. 409 | */ 410 | tanh(x: number): number; 411 | 412 | /** 413 | * Returns the inverse hyperbolic cosine of a number. 414 | * @param x A numeric expression that contains an angle measured in radians. 415 | */ 416 | acosh(x: number): number; 417 | 418 | /** 419 | * Returns the inverse hyperbolic sine of a number. 420 | * @param x A numeric expression that contains an angle measured in radians. 421 | */ 422 | asinh(x: number): number; 423 | 424 | /** 425 | * Returns the inverse hyperbolic tangent of a number. 426 | * @param x A numeric expression that contains an angle measured in radians. 427 | */ 428 | atanh(x: number): number; 429 | 430 | /** 431 | * Returns the square root of the sum of squares of its arguments. 432 | * @param values Values to compute the square root for. 433 | * If no arguments are passed, the result is +0. 434 | * If there is only one argument, the result is the absolute value. 435 | * If any argument is +Infinity or -Infinity, the result is +Infinity. 436 | * If any argument is NaN, the result is NaN. 437 | * If all arguments are either +0 or −0, the result is +0. 438 | */ 439 | hypot(...values: number[]): number; 440 | 441 | /** 442 | * Returns the integral part of the a numeric expression, x, removing any fractional digits. 443 | * If x is already an integer, the result is x. 444 | * @param x A numeric expression. 445 | */ 446 | trunc(x: number): number; 447 | 448 | /** 449 | * Returns the nearest single precision float representation of a number. 450 | * @param x A numeric expression. 451 | */ 452 | fround(x: number): number; 453 | 454 | /** 455 | * Returns an implementation-dependent approximation to the cube root of number. 456 | * @param x A numeric expression. 457 | */ 458 | cbrt(x: number): number; 459 | } 460 | 461 | interface PromiseLike { 462 | /** 463 | * Attaches callbacks for the resolution and/or rejection of the Promise. 464 | * @param onfulfilled The callback to execute when the Promise is resolved. 465 | * @param onrejected The callback to execute when the Promise is rejected. 466 | * @returns A Promise for the completion of which ever callback is executed. 467 | */ 468 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; 469 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; 470 | } 471 | 472 | /** 473 | * Represents the completion of an asynchronous operation 474 | */ 475 | interface Promise { 476 | /** 477 | * Attaches callbacks for the resolution and/or rejection of the Promise. 478 | * @param onfulfilled The callback to execute when the Promise is resolved. 479 | * @param onrejected The callback to execute when the Promise is rejected. 480 | * @returns A Promise for the completion of which ever callback is executed. 481 | */ 482 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; 483 | then(onfulfilled?: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => void): Promise; 484 | 485 | /** 486 | * Attaches a callback for only the rejection of the Promise. 487 | * @param onrejected The callback to execute when the Promise is rejected. 488 | * @returns A Promise for the completion of the callback. 489 | */ 490 | catch(onrejected?: (reason: any) => T | PromiseLike): Promise; 491 | catch(onrejected?: (reason: any) => void): Promise; 492 | } 493 | 494 | interface PromiseConstructor { 495 | /** 496 | * A reference to the prototype. 497 | */ 498 | prototype: Promise; 499 | 500 | /** 501 | * Creates a new Promise. 502 | * @param executor A callback used to initialize the promise. This callback is passed two arguments: 503 | * a resolve callback used resolve the promise with a value or the result of another promise, 504 | * and a reject callback used to reject the promise with a provided reason or error. 505 | */ 506 | new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; 507 | 508 | /** 509 | * Creates a Promise that is resolved with an array of results when all of the provided Promises 510 | * resolve, or rejected when any Promise is rejected. 511 | * @param values An array of Promises. 512 | * @returns A new Promise. 513 | */ 514 | all(values: IterableShim>): Promise; 515 | 516 | /** 517 | * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved 518 | * or rejected. 519 | * @param values An array of Promises. 520 | * @returns A new Promise. 521 | */ 522 | race(values: IterableShim>): Promise; 523 | 524 | /** 525 | * Creates a new rejected promise for the provided reason. 526 | * @param reason The reason the promise was rejected. 527 | * @returns A new rejected Promise. 528 | */ 529 | reject(reason: any): Promise; 530 | 531 | /** 532 | * Creates a new rejected promise for the provided reason. 533 | * @param reason The reason the promise was rejected. 534 | * @returns A new rejected Promise. 535 | */ 536 | reject(reason: any): Promise; 537 | 538 | /** 539 | * Creates a new resolved promise for the provided value. 540 | * @param value A promise. 541 | * @returns A promise whose internal state matches the provided promise. 542 | */ 543 | resolve(value: T | PromiseLike): Promise; 544 | 545 | /** 546 | * Creates a new resolved promise . 547 | * @returns A resolved promise. 548 | */ 549 | resolve(): Promise; 550 | } 551 | 552 | declare var Promise: PromiseConstructor; 553 | 554 | interface Map { 555 | clear(): void; 556 | delete(key: K): boolean; 557 | forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void; 558 | get(key: K): V; 559 | has(key: K): boolean; 560 | set(key: K, value?: V): Map; 561 | size: number; 562 | entries(): IterableIteratorShim<[K, V]>; 563 | keys(): IterableIteratorShim; 564 | values(): IterableIteratorShim; 565 | } 566 | 567 | interface MapConstructor { 568 | new (): Map; 569 | new (iterable: IterableShim<[K, V]>): Map; 570 | prototype: Map; 571 | } 572 | 573 | declare var Map: MapConstructor; 574 | 575 | interface Set { 576 | add(value: T): Set; 577 | clear(): void; 578 | delete(value: T): boolean; 579 | forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void; 580 | has(value: T): boolean; 581 | size: number; 582 | entries(): IterableIteratorShim<[T, T]>; 583 | keys(): IterableIteratorShim; 584 | values(): IterableIteratorShim; 585 | } 586 | 587 | interface SetConstructor { 588 | new (): Set; 589 | new (iterable: IterableShim): Set; 590 | prototype: Set; 591 | } 592 | 593 | declare var Set: SetConstructor; 594 | 595 | interface WeakMap { 596 | delete(key: K): boolean; 597 | get(key: K): V; 598 | has(key: K): boolean; 599 | set(key: K, value?: V): WeakMap; 600 | } 601 | 602 | interface WeakMapConstructor { 603 | new (): WeakMap; 604 | new (iterable: IterableShim<[K, V]>): WeakMap; 605 | prototype: WeakMap; 606 | } 607 | 608 | declare var WeakMap: WeakMapConstructor; 609 | 610 | interface WeakSet { 611 | add(value: T): WeakSet; 612 | delete(value: T): boolean; 613 | has(value: T): boolean; 614 | } 615 | 616 | interface WeakSetConstructor { 617 | new (): WeakSet; 618 | new (iterable: IterableShim): WeakSet; 619 | prototype: WeakSet; 620 | } 621 | 622 | declare var WeakSet: WeakSetConstructor; 623 | 624 | declare module Reflect { 625 | function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; 626 | function construct(target: Function, argumentsList: ArrayLike): any; 627 | function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; 628 | function deleteProperty(target: any, propertyKey: PropertyKey): boolean; 629 | function enumerate(target: any): IterableIteratorShim; 630 | function get(target: any, propertyKey: PropertyKey, receiver?: any): any; 631 | function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; 632 | function getPrototypeOf(target: any): any; 633 | function has(target: any, propertyKey: PropertyKey): boolean; 634 | function isExtensible(target: any): boolean; 635 | function ownKeys(target: any): Array; 636 | function preventExtensions(target: any): boolean; 637 | function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; 638 | function setPrototypeOf(target: any, proto: any): boolean; 639 | } 640 | 641 | declare module "es6-shim" { 642 | var String: StringConstructor; 643 | var Array: ArrayConstructor; 644 | var Number: NumberConstructor; 645 | var Math: Math; 646 | var Object: ObjectConstructor; 647 | var Map: MapConstructor; 648 | var Set: SetConstructor; 649 | var WeakMap: WeakMapConstructor; 650 | var WeakSet: WeakSetConstructor; 651 | var Promise: PromiseConstructor; 652 | module Reflect { 653 | function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; 654 | function construct(target: Function, argumentsList: ArrayLike): any; 655 | function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; 656 | function deleteProperty(target: any, propertyKey: PropertyKey): boolean; 657 | function enumerate(target: any): Iterator; 658 | function get(target: any, propertyKey: PropertyKey, receiver?: any): any; 659 | function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; 660 | function getPrototypeOf(target: any): any; 661 | function has(target: any, propertyKey: PropertyKey): boolean; 662 | function isExtensible(target: any): boolean; 663 | function ownKeys(target: any): Array; 664 | function preventExtensions(target: any): boolean; 665 | function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean; 666 | function setPrototypeOf(target: any, proto: any): boolean; 667 | } 668 | } -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noImplicitAny": false, 4 | "noEmitOnError": true, 5 | "removeComments": false, 6 | "sourceMap": true, 7 | "target": "es5", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "module": "system", 11 | "moduleResolution": "node" 12 | }, 13 | "exclude": [ 14 | "node_modules", 15 | "wwwroot/lib" 16 | ] 17 | } -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | /// 8 | /// 9 | /// 10 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from 'angular2/core'; 2 | 3 | @Component({ 4 | selector: 'my-app', 5 | template: 'My First Angular 2 App' 6 | }) 7 | export class AppComponent { } -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/app/boot.ts: -------------------------------------------------------------------------------- 1 | import {bootstrap} from 'angular2/platform/browser' 2 | import {AppComponent} from './app.component' 3 | 4 | bootstrap(AppComponent); -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Wrapping element */ 7 | /* Set some basic padding to keep content from hitting the edges */ 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Set widths on the form inputs since otherwise they're 100% wide */ 14 | input, 15 | select, 16 | textarea { 17 | max-width: 280px; 18 | } 19 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nbellocam/Angular2ASPNETCoreBaseApp/042f0ce009fa3377ee621026c893a8f7df10a7c1/src/MyAngular2BaseApp/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/images/ASP-NET-Banners-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nbellocam/Angular2ASPNETCoreBaseApp/042f0ce009fa3377ee621026c893a8f7df10a7c1/src/MyAngular2BaseApp/wwwroot/images/ASP-NET-Banners-01.png -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /src/MyAngular2BaseApp/wwwroot/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------