PWA Angular 4 project that uses .NET Core and Entity Framework
npm install generator-pwa-angular-core
Yeoman PWA Angular 4 & .NET Core
=================

A way to quickly generate a progressive web app that uses Angular 4, .NET Core, and Entity Framework. This application can be added to your desktop, or homescreen on iOS or Android devices.
Live demo: https://angularcore.azurewebsites.net/home
* The API example (Todo list) does not work in demo (no SQL server configured in Azure).
npm install -g yo
npm install -g generator-pwa-angular-core
`
2. Install .NET Core you should be able to find documentation on getting it up and running at the provided link.
3. Install Angular CLI
`
npm install -g @angular/cli
`
4. Open the command prompt and navigate to where you want the project to be located. Then run yo and then select "Pwa Angular Core"
`
yo
`
5. You will be prompted on to enter values for the namespace, and a prefix for your components.
6. This will take a couple minutes for all files to be copied, packages to be installed, and for webpack to compile your resources.
* If any errors occur during this step try running "dotnet restore" or "npm install" to find out what packages are causing issues.
7. If everything installed correctly you can now run the project by running the following command.
`
set ASPNETCORE_ENVIRONMENT=Development or setx ASPNETCORE_ENVIRONMENT "Development" (in powershell)
dotnet run
`
8. Navigate to https://localhost:5001

9. To create your migration in your SQL server be sure the connection string in appsettings.json is correct (I use the local SQL database that comes with my Visual Studio installation). Then run the following commands to create the tables. The Todo API Example should now work.
`
dotnet ef migrations add InitialMigration
dotnet ef database update
`
10. You can rebuild the compiled dist folder by first cleaning out the old folders then rebuilding.
`
npm run clean:dist
npm run build:dev
`
$3
I have not perfected the deployment to production but by running
`
set ASPNETCORE_ENVIRONMENT=Production or setx ASPNETCORE_ENVIRONMENT "Production" (in powershell)
npm run clean:dist
npm run build:prod
``