foreach (var item in list.Skip(1))
Category ASP.NET
Angular CLI New Project and Component
- Creating New Project Options:
Details Here
2. If you see the project did not created the templete as seperate html file, open angular.json file and setup these 2 line to false like this:
4. Adding New Component:
ng g c test2
The type ‘System.Data.Entity.DbContext’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘EntityFramework 2
- Go to Tools » NuGet Package Manager » Manage NuGet Packages For Solution.
- Ensure that Browse is selected and type “entityframework” into the search box. and install the entity framework
Check if its exist in package.config <package id=”EntityFramework” version=”6.2.0″ targetFramework=”net461″ /> exist
3 layer architecture of Angular Project
Layer 1: WebUI (Angular)
https://monirblog.wordpress.com/2018/08/29/setup-angular-2-environment-in-a-new-computer/
Layer 2: ASP.NET Web API Service
https://monirblog.wordpress.com/2018/09/11/asp-net-web-api-service/
Video: https://www.youtube.com/watch?v=FQ__z26TsHU
Layer 3: Data Access Layer
https://monirblog.wordpress.com/2018/09/11/data-access-layer/
ADD TFS in VS Code
Setup Angular 2 Environment in a NEW Computer
- Video tutorial: https://www.youtube.com/watch?v=H9iK2Eib85E
- Check which version of OS you have by start–>run–>msinfo32
- Download & install 64 bit Node from https://nodejs.org/en/download/
- after install, check it using cmd as administrator by running it: node -v
- You have to have VS 2015 update 3 (Minimum)
- VS 2015–>Tools Option–>organize the options like here:
- Install TypeScript for Visual Studio 2015 (Latest version) from https://www.microsoft.com/en-us/download/details.aspx?id=48593.
- Install Angular CLI by typing in cmd: npm install -g @angular/cli
- Download VS Code from https://code.visualstudio.com/download
- Create New Project using CMD: ng new TestProject1 –skip-tests true
- Once creating complete, Change Directory : cd C:\app\Angular
- When you are inside the project folder: open the project using VS Code:
Winform – Override textbox to show sample text and clear on click
Winform watermark text on textbox:
public string initTextClient = “Client”;
public bool editedClient;public SelectMatterClient()
{
InitializeComponent();txtClient.Text = initTextClient;
txtClient.ForeColor = Color.Gray;}
private void txtClient_KeyPress(object sender, KeyPressEventArgs e)
{
editedClient = !char.IsControl(e.KeyChar);
}private void txtClient_Enter(object sender, EventArgs e)
{
if (!editedClient)
{
txtClient.Clear();
txtClient.ForeColor = Color.Black;
}
}private void txtClient_Leave(object sender, EventArgs e)
{
if (!editedClient)
{
txtClient.Text = initTextClient;
txtClient.ForeColor = Color.Gray;
}
}
VS 2017 add setup project type
Install this file as administrator and you will see the setup project type.
Angular CLI create new component command
ng g c employees/listEmployees –spec false –flat true
this will create all required component inside the employees folder.
deploy web service to IIS
Build your VS solution and copy the published files to a specific folder.
and add a new website in IIS and set the destination to that folder
Change connect as your authentication details to that folder and test settings.
Change the App pool to asp.net 4
You are good to go 🙂