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.slnfile, which should open Visual Studio.
- Run all tests associated with the ResistorRating.Testproject. They all should pass.
- Get the ResistorRating.Apiproject'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.Apias 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.Webfolder 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.tsandresistor-calc-repo.service.tsfiles and change the_restBaseApivariable path to the localResistorRating.Api'starget 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.