Posts

Showing posts from June, 2017

Angular and Aspnet Core

1)ClientApp--Client side code  --Angular app App folder has a)app.module.TS b)components 2)Controllers and Views--ASP.netcore 3)WWWRoot--public assets of client  It has dist--Distributable folder--(img,fonts,icons) dist has  a)main-client.js ---compilation of angular app  into js b)vendor.js---compilation of all third party libraries c)vendor.css--compilation of all third party css 4)Appsettings.json---applications settings --prev versions use web.config 5).csproj----VS-17 Recognises 6)Web.config---only <system.webserver> --configuration of IIS 7)couple of Webpack configuration files--bundler for client side code--compile and minify java files and style sheet files--- Webpack.vendor.js--configuration for compiling third party libraries- in entry vendor --all the third party libraries are present Infuture to add third party--add in entry vendor in webpack.vendor 8)Program.cs--Main is the entry point--configure webserver 1)kestral--cr...

Adding Style separately in a File

/*site.css*/ body { font-family: sans-serif; font-size: 16px; font-weight: bold; } label { font-weight: normal; display:block; } input[type=text],input[type=password],textarea { width: 150px; }

Adding Style in the Head

<html> <head>     <meta charset="utf-8" />     <title>The World</title> <style> body{ font-family:sans-serif; font-size:16px; } </style> </head>

Adding Style directly to the body

<body style="font-family:sans-serif; font-size:16px;"> <form> <div> <label>Date</label> <input /> </div> <div> <label>Location</label> <input /> </div> <div> <input type="submit" value="add" /> </div> </form> </body>

ASP.NET CORE Building API

PM Commands--Scaffolding 1)Install-Package Npgsql.EntityFrameworkCore.PostgreSQL.Design 2)Install-Package Npgsql.EntityFrameworkCore.PostgreSQL 3)Install-Package Microsoft.EntityFrameworkCore.Tools