A Simple Angular 6 client and ASP.Net Web Api 2 server project to calculate the resistance of resistors. This simple app uses Electric color code rings to calculate the resistance for the resistors. A user can pick one or all four color bands for a resistor to check the calculated resistance.
For more details, please check this wiki link: Electronic color code
- Visual Studio 2017 (.NET fw 4.6.1), Visual Code
- Nuget Package manager, npm
- .NET 4.6.1, Node v8.11.2, npm v6.0.0
- Server side projects:
ResistorRating.Api
,ResistorRating.Library
- Unit Test Project:
ResistorRating.Test
- Frontend Project/Folder:
ResistorRating.Web
A live demo of the application is available here
- Clone or download this repository to your local machine.
- Make sure you have all the above-mentioned tools already set up on your local machine.
- Open
ResistorRatingCalculator.sln
file, which should open Visual Studio. - Run all tests associated with the
ResistorRating.Test
project. They all should pass. - Get the
ResistorRating.Api
project's properties. Select a Web tab in the properties. Copy Project Url for future use. Default should be:http://localhost:51487/
- If not, set
ResistorRating.Api
as the solution's start-up project and Start Debugging the solution (click F5).
- Go to the downloaded directory for this repository.
- Right-click on the
ResistorRating.Web
folder and select "Open with Visual Code". - Open the integrated terminal, run this command:
npm install
. - Navigate to this folder in Visual Code:
.\src\app\services\datacontext
. - Open
lookup-repo.service.ts
andresistor-calc-repo.service.ts
files and change the_restBaseApi
variable path to the localResistorRating.Api's
target path. For example,http://localhost:51487/api
- Save both files and we are all set to run our client-side app too.
- Go to the integrated terminal again and run this command:
ng serve -o
.
The above command will build an Angular app and open your browser and load the Resistor Rating Calculator app. You can test and change the app at your will.