{"id":16532,"date":"2018-06-07T11:11:28","date_gmt":"2018-06-07T09:11:28","guid":{"rendered":"http:\/\/www.highcharts.com\/blog\/?p=16532"},"modified":"2026-01-12T09:56:06","modified_gmt":"2026-01-12T09:56:06","slug":"creating-a-poll-application-using-asp-net-angular-5-ef-core-highcharts","status":"publish","type":"post","link":"https:\/\/www.highcharts.com\/blog\/tutorials\/creating-a-poll-application-using-asp-net-angular-5-ef-core-highcharts\/","title":{"rendered":"Creating a poll application using ASP.NET, Angular 5, EF core &#038; Highcharts"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>In this tutorial, we will create an online poll application using ASP.NET Core, Visual Studio 2017, SQL Server 2014, Angular 5 and Entity Framework core. Since this is the season of IPL in India (Professional Twenty20 cricket league in India), we will create an online poll for \u201cWho is going to win IPL 2018\u201d. The poll results will be displayed as a column chart using Highcharts. You do not need to be a Cricket fan to follow this code. (And if you are, you are advised not to watch cricket while coding). Naturally, this code can be used to create a poll on any other topic!<\/p>\n<p>The final result looks like the GiF below:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16533 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06105334\/AppDemoGif.gif\" alt=\"\" width=\"650\" height=\"400\" \/><\/p>\n<p><b>Prerequisites<\/b><\/p>\n<ul>\n<li>Install .NET Core 2.0.0 or above SDK from <a href=\"https:\/\/www.microsoft.com\/net\/learn\/get-started\/windows#windowscmd\">here<\/a>.<\/li>\n<li>Install the latest version of Visual Studio 2017 Community Edition from <a href=\"https:\/\/www.visualstudio.com\/downloads\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/li>\n<li>Download and install the latest version of Node.js from <a href=\"https:\/\/nodejs.org\/en\/download\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/li>\n<li>SQL Server 2008 or above.<\/li>\n<\/ul>\n<p><b>Source Code<\/b><br \/>\nLet\u2019s dive in the source code.<\/p>\n<p><i><b>Remark<\/b><br \/>\nBefore proceeding, I would recommend you to get the source code from <a href=\"https:\/\/github.com\/AnkitSharma-007\/ASPCore.Angular.HighCharts\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub<\/a>.<\/i><\/p>\n<p><b>Creating Table<\/b><br \/>\nWe will store the team data in <code>IplTeams<\/code> table. Execute the following commands to create the table.<\/p>\n<pre>CREATE TABLE IplTeams    \r\n(  \r\nTeamId INTEGER IDENTITY(1,1) PRIMARY KEY,  \r\nTeamName VARCHAR(30) NOT NULL,  \r\nVoteCount INTEGER NOT NULL  \r\n) \r\n<\/pre>\n<p>Now, we will put in the team names and initialize the vote count to zero. Execute the following insert statements.<\/p>\n<pre>INSERT INTO IplTeams VALUES ('Chennai Super Kings',0)  \r\nINSERT INTO IplTeams VALUES ('Delhi Daredevils',0)  \r\nINSERT INTO IplTeams VALUES ('Kings XI Punjab',0)  \r\nINSERT INTO IplTeams VALUES ('Kolkata Knight Riders',0)  \r\nINSERT INTO IplTeams VALUES ('Mumbai Indians',0)  \r\nINSERT INTO IplTeams VALUES ('Rajasthan Royals',0)  \r\nINSERT INTO IplTeams VALUES ('Royal Challengers Bangalore',0)  \r\nINSERT INTO IplTeams VALUES ('Sunrisers Hyderabad',0)<\/pre>\n<h2>Create MVC Web Application<\/h2>\n<p>Open Visual Studio and select File -&gt; New -&gt; Project.<br \/>\nAfter selecting the project, a &#8220;New Project&#8221; dialog will open. Select .NET Core inside Visual C# menu from the left panel.<br \/>\nThen, select \u201cASP.NET Core Web Application\u201d from available project types. Put the name of the project as <code>IPLPollDemo<\/code> and press OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16541 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155333\/CreateProejct_1.png\" alt=\"\" width=\"650\" height=\"370\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155333\/CreateProejct_1.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155333\/CreateProejct_1-560x319.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155333\/CreateProejct_1-360x205.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>After clicking on OK, a new dialog will open asking you to select the project template. You can observe two drop-down menus at the top left of the template window. Select \u201c.NET Core\u201d and \u201cASP.NET Core 2.0\u201d from these dropdowns. Then, select \u201cAngular\u201d template and press OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16542 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155451\/CreateProejct_2.png\" alt=\"\" width=\"650\" height=\"424\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155451\/CreateProejct_2.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155451\/CreateProejct_2-560x365.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155451\/CreateProejct_2-360x235.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Now, our project is created.<br \/>\nSince we are using Highcharts in our application, we need to install packages for it. Open <code>package.json<\/code> file and put in the following code into it.<\/p>\n<pre>{  \r\n  \"name\": \"IPLPollDemo\",  \r\n  \"private\": true,  \r\n  \"version\": \"0.0.0\",  \r\n  \"scripts\": {  \r\n    \"test\": \"karma start ClientApp\/test\/karma.conf.js\"  \r\n  },  \r\n  \"devDependencies\": {  \r\n    \"@angular\/animations\": \"5.2.10\",  \r\n    \"@angular\/common\": \"5.2.10\",  \r\n    \"@angular\/compiler\": \"5.2.10\",  \r\n    \"@angular\/compiler-cli\": \"5.2.10\",  \r\n    \"@angular\/core\": \"5.2.10\",  \r\n    \"@angular\/forms\": \"5.2.10\",  \r\n    \"@angular\/http\": \"5.2.10\",  \r\n    \"@angular\/platform-browser\": \"5.2.10\",  \r\n    \"@angular\/platform-browser-dynamic\": \"5.2.10\",  \r\n    \"@angular\/platform-server\": \"5.2.10\",  \r\n    \"@angular\/router\": \"5.2.10\",  \r\n    \"@ngtools\/webpack\": \"6.0.0-rc.10\",  \r\n    \"@types\/chai\": \"4.1.3\",  \r\n    \"@types\/highcharts\": \"^5.0.22\",  \r\n    \"@types\/jasmine\": \"2.8.6\",  \r\n    \"@types\/webpack-env\": \"1.13.6\",  \r\n    \"angular2-router-loader\": \"0.3.5\",  \r\n    \"angular2-template-loader\": \"0.6.2\",  \r\n    \"aspnet-prerendering\": \"^3.0.1\",  \r\n    \"aspnet-webpack\": \"^2.0.1\",  \r\n    \"awesome-typescript-loader\": \"5.0.0\",  \r\n    \"bootstrap\": \"4.1.1\",  \r\n    \"chai\": \"4.1.2\",  \r\n    \"css\": \"2.2.1\",  \r\n    \"css-loader\": \"0.28.11\",  \r\n    \"es6-shim\": \"0.35.3\",  \r\n    \"event-source-polyfill\": \"0.0.12\",  \r\n    \"expose-loader\": \"0.7.5\",  \r\n    \"extract-text-webpack-plugin\": \"3.0.2\",  \r\n    \"file-loader\": \"1.1.11\",  \r\n    \"html-loader\": \"0.5.5\",  \r\n    \"isomorphic-fetch\": \"2.2.1\",  \r\n    \"jasmine-core\": \"3.1.0\",  \r\n    \"jquery\": \"3.3.1\",  \r\n    \"json-loader\": \"0.5.7\",  \r\n    \"karma\": \"2.0.2\",  \r\n    \"karma-chai\": \"0.1.0\",  \r\n    \"karma-chrome-launcher\": \"2.2.0\",  \r\n    \"karma-cli\": \"1.0.1\",  \r\n    \"karma-jasmine\": \"1.1.1\",  \r\n    \"karma-webpack\": \"3.0.0\",  \r\n    \"preboot\": \"6.0.0-beta.3\",  \r\n    \"raw-loader\": \"0.5.1\",  \r\n    \"reflect-metadata\": \"0.1.12\",  \r\n    \"rxjs\": \"^6.0.0\",  \r\n    \"style-loader\": \"0.21.0\",  \r\n    \"to-string-loader\": \"1.1.5\",  \r\n    \"typescript\": \"2.8.3\",  \r\n    \"url-loader\": \"1.0.1\",  \r\n    \"webpack\": \"4.6.0\",  \r\n    \"webpack-hot-middleware\": \"2.22.1\",  \r\n    \"webpack-merge\": \"4.1.2\",  \r\n    \"zone.js\": \"0.8.26\"  \r\n  },  \r\n  \"dependencies\": {  \r\n    \"angular-highcharts\": \"^5.2.12\",  \r\n    \"highcharts\": \"^6.1.0\"  \r\n  }  \r\n} \r\n<\/pre>\n<p><i><b>Remark<\/b><br \/>\nIf you find the version of Angular is 4 in your package.json file, then copy the full code as above to update your Angular version to 5. If you are already using Angular 5 then just copy the lines to include Highcharts dependency.<\/i><\/p>\n<p>Now, close the Visual Studio instance and navigate to the folder containing <code>package.json<\/code> file and open command prompt. Execute <code>npm install<\/code> command to install all the required dependencies. Refer to the image below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16545 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155840\/Cmd.png\" alt=\"\" width=\"650\" height=\"369\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155840\/Cmd.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155840\/Cmd-560x318.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155840\/Cmd-360x204.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Open your project using Visual Studio 2017. You can observe the folder structure in Solution Explorer as shown in the below image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16546 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155934\/solutionexp_1.png\" alt=\"\" width=\"291\" height=\"691\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155934\/solutionexp_1.png 291w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155934\/solutionexp_1-185x440.png 185w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155934\/solutionexp_1-248x590.png 248w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06155934\/solutionexp_1-118x280.png 118w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/p>\n<p>Here, we have our Controllers and Views folders. We won\u2019t be touching the Views folders for this tutorial since we will be using Angular to handle the UI. The Controllers folders will contain our Web API controller. The point of interest for us is the ClientApp folder where the client side of our application resides. Inside the <i>ClientApp\/app\/components<\/i> folder, we already have few components created which are provided by default with the Angular template in VS 2017. These components won\u2019t affect our application, but for the sake of this tutorial, we will delete fetchdata and counter folders from <i>ClientApp\/app\/components<\/i>.<\/p>\n<h2>Scaffolding the Model to the Application<\/h2>\n<p>We are using Entity Framework core database first approach to create our models. Navigate to Tools -&gt; NuGet Package Manager -&gt; Package Manager Console.<br \/>\nWe have to install the package for the database provider that we are targeting which is SQL Server in this case. Run the following command:<br \/>\n<code>Install-Package Microsoft.EntityFrameworkCore.SqlServer<\/code><\/p>\n<p>Since we are using Entity Framework Tools to create a model from the existing database, we will install the tools package as well. Run the following command:<br \/>\n<code>Scaffold-DbContext \"Your connection string here\" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables IplTeams <\/code><\/p>\n<p>Do not forget to put your own connection string (inside &#8221; &#8220;). After this command is executed successfully you can observe a Models folder has been created and it contains two class files <code>myTestDBContext.cs<\/code> and <code>IplTeams.cs<\/code>. We have successfully created our Models using EF core database first approach.<br \/>\nNow, create one more class file to handle database related operations<br \/>\nRight click on Models folder and select Add -&gt; Class. Name your class <code>TeamDataAccessLayer.cs<\/code> and click Add button. At this point of time, the Models folder will have the following structure:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16549 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06160803\/solutionexp_2.png\" alt=\"\" width=\"259\" height=\"450\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06160803\/solutionexp_2.png 259w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06160803\/solutionexp_2-253x440.png 253w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06160803\/solutionexp_2-161x280.png 161w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/p>\n<p>Open <code>TeamDataAccessLayer.cs<\/code> and put the following code to handle database operations.<\/p>\n<pre>using Microsoft.EntityFrameworkCore;  \r\nusing System;  \r\nusing System.Collections.Generic;  \r\nusing System.Linq;  \r\nusing System.Threading.Tasks;  \r\n  \r\nnamespace IPLPollDemo.Models  \r\n{  \r\n    public class TeamDataAccessLayer  \r\n    {  \r\n        myTestDBContext db = new myTestDBContext();  \r\n  \r\n        \/\/To get the list of all teams from database  \r\n        public IEnumerable GetAllTeams()  \r\n        {  \r\n            try  \r\n            {  \r\n                return db.IplTeams.ToList();  \r\n            }  \r\n            catch  \r\n            {  \r\n                throw;  \r\n            }  \r\n        }  \r\n  \r\n        \/\/To update the vote count of a team by one  \r\n        public int RecordVote(IplTeams iplTeam)  \r\n        {  \r\n            try  \r\n            {  \r\n  \r\n                db.Database.ExecuteSqlCommand(\"update IplTeams set VoteCount = VoteCount + 1 where TeamID = {0}\", parameters: iplTeam.TeamId);  \r\n  \r\n                return 1;  \r\n            }  \r\n            catch  \r\n            {  \r\n                throw;  \r\n            }  \r\n        }  \r\n  \r\n        \/\/To get the total votes count   \r\n        public int GetTotalVoteCount()  \r\n        {  \r\n            try  \r\n            {  \r\n                return db.IplTeams.Sum(t =&gt; t.VoteCount);  \r\n            }  \r\n            catch  \r\n            {  \r\n                throw;  \r\n            }  \r\n        }  \r\n    }  \r\n}  \r\n<\/pre>\n<p>In this class we have defined three methods.<\/p>\n<ol>\n<li>GetAllTeams \u2013 To get the list of all the eight teams from the database.<\/li>\n<li>RecordVote \u2013 To update the vote count for each team after the user submits his\/her vote.<\/li>\n<li>GetTotalVoteCount \u2013 To get the sum of votes of all the teams.<\/li>\n<\/ol>\n<p>Now, let\u2019s proceed to create our Web API Controller.<\/p>\n<h2>Adding the Web API Controller to the Application<\/h2>\n<p>Right click on Controllers folder and select Add -&gt; New Item.<\/p>\n<p>An \u201cAdd New Item\u201d dialog box will open. Select ASP.NET from the left panel, then select \u201cWeb API Controller Class\u201d from templates panel and put the name as <code>TeamController.cs<\/code>. Click Add.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16552 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161058\/AddController.png\" alt=\"\" width=\"650\" height=\"370\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161058\/AddController.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161058\/AddController-560x319.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161058\/AddController-360x205.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>This creates our Web API TeamController class, where we will put all our business logic. We will call the methods of <code>TeamDataAccessLayer<\/code> to fetch data and pass on the data to the Angular frontend.<br \/>\nOpen <code>TeamController.cs<\/code> file and put the following code into it.<\/p>\n<pre>using System;  \r\nusing System.Collections.Generic;  \r\nusing System.Linq;  \r\nusing System.Threading.Tasks;  \r\nusing IPLPollDemo.Models;  \r\nusing Microsoft.AspNetCore.Mvc;  \r\n  \r\nnamespace IPLPollDemo.Controllers  \r\n{  \r\n    [Route(\"api\/Team\")]  \r\n    public class TeamController : Controller  \r\n    {  \r\n        TeamDataAccessLayer objTeam = new TeamDataAccessLayer();  \r\n  \r\n        [HttpGet]  \r\n        [Route(\"GetTeamList\")]  \r\n        public IEnumerable GetTeamList()  \r\n        {  \r\n            return objTeam.GetAllTeams();  \r\n        }  \r\n  \r\n        [HttpGet]  \r\n        [Route(\"TotalVotes\")]  \r\n        public int TotalVotes()  \r\n        {  \r\n            return objTeam.GetTotalVoteCount();  \r\n        }  \r\n  \r\n        [HttpPut]  \r\n        [Route(\"UpdateVoteCount\")]  \r\n        public int UpdateVoteCount([FromBody] IplTeams team)  \r\n        {  \r\n            return objTeam.RecordVote(team);  \r\n        }  \r\n    }  \r\n}  \r\n<\/pre>\n<h2>Create the Angular Service<\/h2>\n<p>Next, create an Angular service to convert the Web API response to JSON and pass it to our component. Right click on ClientApp\/app folder and then Add -&gt; New Folder and name the folder as Services.<\/p>\n<p>Right click on Sevices folder and select Add -&gt; New Item. An \u201cAdd New Item\u201d dialog box will open. Select Scripts from the left panel, then select &#8220;TypeScript File\u201d from templates panel, and put the name as teamservice.service.ts. Click Add.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16553 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161304\/AddComponent.png\" alt=\"\" width=\"650\" height=\"370\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161304\/AddComponent.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161304\/AddComponent-560x319.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161304\/AddComponent-360x205.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Put the below code in <code>teamservice.service.ts<\/code> file.<\/p>\n<pre>import { Injectable, Inject } from '@angular\/core';  \r\nimport { Http, Response } from '@angular\/http';  \r\nimport { Observable } from 'rxjs\/Observable';  \r\nimport { Router } from '@angular\/router';  \r\nimport 'rxjs\/add\/operator\/map';  \r\nimport 'rxjs\/add\/operator\/catch';  \r\nimport 'rxjs\/add\/observable\/throw';  \r\n  \r\n  \r\n@Injectable()  \r\nexport class TeamService {  \r\n    myAppUrl: string = \"\";  \r\n  \r\n    constructor(private _http: Http, @Inject('BASE_URL') baseUrl: string) {  \r\n        this.myAppUrl = baseUrl;  \r\n    }  \r\n  \r\n    getTeams() {  \r\n        return this._http.get(this.myAppUrl + 'api\/Team\/GetTeamList')  \r\n            .map((response: Response) =&gt; response.json())  \r\n            .catch(this.errorHandler);  \r\n    }  \r\n  \r\n    getTotalVotes() {  \r\n        return this._http.get(this.myAppUrl + 'api\/Team\/TotalVotes')  \r\n            .map((response: Response) =&gt; response.json())  \r\n            .catch(this.errorHandler);  \r\n    }  \r\n  \r\n    saveVotes(team) {  \r\n        return this._http.put(this.myAppUrl + 'api\/Team\/UpdateVoteCount', team)  \r\n            .map((response: Response) =&gt; response.json())  \r\n            .catch(this.errorHandler);  \r\n    }  \r\n  \r\n    errorHandler(error: Response) {  \r\n        console.log(error);  \r\n        return Observable.throw(error);  \r\n    }  \r\n}  \r\n<\/pre>\n<p>In the constructor, we are injecting the HTTP service and Base URL of the application to enable web API calls. After that we have defined three functions to call our Web API and convert the result to JSON format. We will call these functions from our components.<br \/>\nAt this point of time, you might get an error \u201cParameter &#8217;employee&#8217; implicitly has an &#8216;any&#8217; type\u201d in <code>empservice.service.ts<\/code> file.<br \/>\nIf you encounter this issue, then add the following line inside <code>tsconfig.json<\/code> file.<\/p>\n<p><code>\"noImplicitAny\": false<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16554 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161458\/tsconfig.png\" alt=\"\" width=\"303\" height=\"283\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161458\/tsconfig.png 303w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161458\/tsconfig-300x280.png 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/p>\n<p>Now, it is time to create our components.<\/p>\n<h2>Creating Angular Components<\/h2>\n<p>We add two Angular components to our application.<\/p>\n<ol>\n<li>Poll component \u2013 to display the team names and a corresponding button to vote for the team.<\/li>\n<li>Result component \u2013 to display the poll results.<\/li>\n<\/ol>\n<p>Right click on <code>ClientApp\/app\/components<\/code> folder and select Add -&gt; New Folder and name the folder as Poll.<br \/>\nRight click on Poll folder and select Add -&gt; New Item. An \u201cAdd New Item\u201d dialog box will open. Select Scripts from the left panel, then select \u201cTypeScript File\u201d from templates panel, and put the name as <code>IPLPoll.component.ts.<\/code> Click Add. This will add a typescript file inside poll folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16555 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161652\/AddService.png\" alt=\"\" width=\"650\" height=\"370\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161652\/AddService.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161652\/AddService-560x319.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161652\/AddService-360x205.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Right click on Poll folder and select Add -&gt; New Item. An \u201cAdd New Item\u201d dialog box will open. Select ASP.NET Core from the left panel, then select \u201cHTML Page\u201d from templates panel, and put the name as <code>IPLPoll.component.html.<\/code> Click Add. This will add an HTML file inside Poll folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16557 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161804\/AddHtml.png\" alt=\"\" width=\"650\" height=\"370\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161804\/AddHtml.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161804\/AddHtml-560x319.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161804\/AddHtml-360x205.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Similarly create a Results folder inside <code>ClientApp\/app\/components<\/code> folder and add <code>PollResult.component.ts<\/code> typescript file and <code>PollResult.component.html<\/code> HTML file to it.<\/p>\n<p>Now, our ClientApp\/app will have the following structure.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16558 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161906\/clientfolder.png\" alt=\"\" width=\"422\" height=\"482\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161906\/clientfolder.png 422w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161906\/clientfolder-385x440.png 385w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06161906\/clientfolder-245x280.png 245w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><\/p>\n<p>Put the following code in <code>IPLPoll.component.ts<\/code> file.<\/p>\n<pre>import { Component, OnInit } from '@angular\/core';  \r\nimport { Http, Headers } from '@angular\/http';  \r\nimport { PercentPipe } from '@angular\/common';  \r\nimport { Router, ActivatedRoute } from '@angular\/router';  \r\nimport { TeamService } from '..\/..\/services\/teamservice.service'  \r\n  \r\n@Component({  \r\n    templateUrl: '.\/IPLPoll.component.html',  \r\n})  \r\n  \r\nexport class IPLPoll {  \r\n  \r\n    public teamList: TeamData[];  \r\n  \r\n    constructor(public http: Http, private _teamService: TeamService, private _router: Router) {  \r\n        this.getTeamList();  \r\n    }  \r\n  \r\n    getTeamList() {  \r\n        this._teamService.getTeams().subscribe(  \r\n            data =&gt; this.teamList = data  \r\n        )  \r\n    }  \r\n  \r\n    save(team) {  \r\n  \r\n        this._teamService.saveVotes(team)  \r\n            .subscribe((data) =&gt; {  \r\n                this._router.navigate(['\/results']);  \r\n            })  \r\n    }  \r\n}  \r\nexport class TeamData {  \r\n    teamId: number;  \r\n    teamName: string;  \r\n    voteCount: number;  \r\n    voteShare: number;  \r\n} \r\n<\/pre>\n<p>We have created a class <code>TeamData<\/code> to hold the details of each team such as <code>teamId<\/code>, <code>teamName<\/code>, <code>voteCoun<\/code>t and <code>voteShare<\/code>. Inside our component class <code>IPLPoll<\/code> , we have created an array variable teamList of type <code>TeamData<\/code>. The <code>getTeamList<\/code> method calls the <code>getTeam<\/code> function of our service <code>TeamService<\/code>, to get the list of teams from database and assign it to <code>teamList<\/code> variable. The <code>getTeamList<\/code> method is called inside the constructor so that the team data will be displayed as the page loads.<br \/>\nThe save method is invoked when the user votes for his favorite team. This calls <code>saveVotes<\/code> function of our service to increment the vote count of that particular team. The user is then redirected to <code>PollResults<\/code> component to view the poll results.<\/p>\n<p>Open <code>IPLPoll.component.html<\/code> file and put the following code into it.<\/p>\n<pre>&lt;h1&gt;Who Will Win IPL 2018 ?&lt;\/h1&gt;  \r\n  \r\n&lt;h3&gt;Vote for your favourite team !!! &lt;\/h3&gt;  \r\n&lt;hr \/&gt;  \r\n  \r\n&lt;p *ngIf=\"!teamList\"&gt;&lt;em&gt;Loading...&lt;\/em&gt;&lt;\/p&gt;  \r\n  \r\n&lt;table class='table' *ngIf=\"teamList\"&gt;  \r\n    &lt;thead&gt;  \r\n        &lt;tr&gt;  \r\n            &lt;th&gt;Team Name&lt;\/th&gt;  \r\n        &lt;\/tr&gt;  \r\n    &lt;\/thead&gt;  \r\n    &lt;tbody&gt;  \r\n        &lt;tr *ngFor=\"let team of teamList\"&gt;  \r\n            &lt;td&gt;{{ team.teamName }}&lt;\/td&gt;  \r\n            &lt;td&gt;  \r\n                &lt;button (click)=\"save(team)\" class=\"btn btn-primary\"&gt; Vote &lt;i class=\"glyphicon glyphicon-thumbs-up\"&gt;&lt;\/i&gt;&lt;\/button&gt;  \r\n            &lt;\/td&gt;  \r\n        &lt;\/tr&gt;  \r\n    &lt;\/tbody&gt;  \r\n&lt;\/table&gt; \r\n<\/pre>\n<p>This html page will display the list of teams along with a Vote button besides each team. When the user clicks on any of the vote button, it will update the vote count and redirects the user to the <code>PollResults<\/code> page.<\/p>\n<p>Now open <code>PollResults.component.ts<\/code> file and put the following code into it:<\/p>\n<pre>import { Component, OnInit } from '@angular\/core';  \r\nimport { Http, Headers } from '@angular\/http';  \r\nimport { PercentPipe } from '@angular\/common';  \r\nimport { Router, ActivatedRoute } from '@angular\/router';  \r\nimport { TeamData } from '..\/poll\/IPLPoll.component';  \r\nimport { TeamService } from '..\/..\/services\/teamservice.service';  \r\n  \r\nimport { Observable } from 'rxjs\/Observable';  \r\nimport 'rxjs\/add\/observable\/zip';  \r\n  \r\nimport { Chart } from 'angular-highcharts';  \r\n  \r\n@Component({  \r\n    templateUrl: '.\/PollResult.component.html',  \r\n})  \r\n  \r\nexport class PollResult {  \r\n  \r\n    public chart: any;  \r\n    public totalVotes: number;  \r\n    public resultList: TeamData[];  \r\n  \r\n    constructor(public http: Http, private _teamService: TeamService) {  \r\n  \r\n        Observable.zip(this._teamService.getTotalVotes(), this._teamService.getTeams())  \r\n            .subscribe(([totalVoteCount, teamListData]) =&gt; {  \r\n                this.totalVotes = totalVoteCount;  \r\n                this.resultList = teamListData;  \r\n  \r\n                for (let i = 0; i &lt; teamListData.length; i++) {  \r\n                    teamListData[i].voteShare = (((teamListData[i].voteCount) \/ this.totalVotes) * 100);  \r\n                }  \r\n  \r\n                this.createCharts();  \r\n            });  \r\n    }  \r\n  \r\n    createCharts() {  \r\n        this.chart = new Chart({  \r\n            chart: {  \r\n                type: 'column'  \r\n            },  \r\n            title: {  \r\n                text: 'Vote share for each team'  \r\n            },  \r\n            xAxis: {  \r\n                type: 'category',  \r\n                labels: {  \r\n                    rotation: -45,  \r\n                    style: {  \r\n                        fontSize: '13px',  \r\n                        fontFamily: 'Verdana, sans-serif'  \r\n                    }  \r\n                }  \r\n            },  \r\n            yAxis: {  \r\n                min: 0,  \r\n                title: {  \r\n                    text: 'Percentage of Votes'  \r\n                }  \r\n            },  \r\n            legend: {  \r\n                enabled: false  \r\n            },  \r\n            tooltip: {  \r\n                pointFormat: 'Vote: <b>{point.y:.2f} %<\/b>'  \r\n            },  \r\n  \r\n            series: [{  \r\n                type: 'column',  \r\n                data: [  \r\n                    { name: this.resultList[0].teamName, y: this.resultList[0].voteShare, color: 'rgba(253, 185, 19, 0.85)' },  \r\n                    { name: this.resultList[1].teamName, y: this.resultList[1].voteShare, color: 'rgba(0, 76, 147, 0.85)' },  \r\n                    { name: this.resultList[2].teamName, y: this.resultList[2].voteShare, color: 'rgba(170, 69, 69, 0.85)' },  \r\n                    { name: this.resultList[3].teamName, y: this.resultList[3].voteShare, color: 'rgba(112, 69, 143, 0.85)' },  \r\n                    { name: this.resultList[4].teamName, y: this.resultList[4].voteShare, color: 'rgba(0, 93, 160, 0.85)' },  \r\n                    { name: this.resultList[5].teamName, y: this.resultList[5].voteShare, color: 'rgba(45, 77, 157, 0.85)' },  \r\n                    { name: this.resultList[6].teamName, y: this.resultList[6].voteShare, color: 'rgba(0, 0, 0, 0.85)' },  \r\n                    { name: this.resultList[7].teamName, y: this.resultList[7].voteShare, color: 'rgba(251, 100, 62, 0.85)' }  \r\n                ],  \r\n            }]  \r\n  \r\n        });  \r\n  \r\n    }  \r\n}  \r\n<\/pre>\n<p>We are fetching the updated list of team data from the database and also the total count of votes for all the teams. We calculate the vote share of each team and then invoke the <code>createCharts()<\/code> method to create the chart of the poll result. The percentage of vote share for each team is calculated by dividing the vote obtained by each team with total number of votes.<br \/>\nThis entire operation takes place in the constructor to display the result as the page loads.<\/p>\n<p>The <code>createCharts()<\/code> method creates the columnar chart with the help of Highcharts library. The percentage of votes is selected as Y-axis and the team name is selected as X-axis. To make the things interesting the color of each column corresponds to the team jersey color.<\/p>\n<p>Open <code>PollResults.component.html<\/code> file and put the following code into it:<\/p>\n<pre>&lt;h2&gt;Your vote has been registered successfully !!! &lt;\/h2&gt;  \r\n  \r\n&lt;h3&gt;Here are voting results &lt;\/h3&gt;  \r\n&lt;hr \/&gt;  \r\n  \r\n&lt;p&gt;&lt;b&gt;Total votes &lt;\/b&gt; : {{totalVotes}}&lt;\/p&gt;  \r\n  \r\n&lt;div [chart]=\"chart\"&gt;&lt;\/div&gt;<\/pre>\n<p>This HTML page is simple. We are displaying the voting results as columnar chart. Just above the chart, we are also displaying the total number of votes.<\/p>\n<h2>Defining route and navigation menu for our Application<\/h2>\n<p>Open \/app\/app.shared.module.ts file and put the following code into it.<\/p>\n<pre>import { NgModule } from '@angular\/core';  \r\nimport { CommonModule } from '@angular\/common';  \r\nimport { FormsModule } from '@angular\/forms';  \r\nimport { HttpModule } from '@angular\/http';  \r\nimport { RouterModule } from '@angular\/router';  \r\nimport { ChartModule } from 'angular-highcharts';  \r\n  \r\nimport { TeamService } from '.\/services\/teamservice.service'  \r\nimport { AppComponent } from '.\/components\/app\/app.component';  \r\nimport { NavMenuComponent } from '.\/components\/navmenu\/navmenu.component';  \r\nimport { HomeComponent } from '.\/components\/home\/home.component';  \r\nimport { IPLPoll } from '.\/components\/Poll\/IPLPoll.component';  \r\nimport { PollResult } from '.\/components\/Results\/PollResult.component';  \r\n  \r\n@NgModule({  \r\n    declarations: [  \r\n        AppComponent,  \r\n        NavMenuComponent,  \r\n        HomeComponent,  \r\n        IPLPoll,  \r\n        PollResult  \r\n    ],  \r\n    imports: [  \r\n        CommonModule,  \r\n        HttpModule,  \r\n        FormsModule,  \r\n        ChartModule,  \r\n        RouterModule.forRoot([  \r\n            { path: '', redirectTo: 'home', pathMatch: 'full' },  \r\n            { path: 'home', component: HomeComponent },  \r\n            { path: 'poll', component: IPLPoll },  \r\n            { path: 'results', component: PollResult },  \r\n            { path: '**', redirectTo: 'home' }  \r\n        ])  \r\n    ],  \r\n    providers: [TeamService]  \r\n})  \r\nexport class AppModuleShared {  \r\n}  \r\n<\/pre>\n<p>Here we have also imported all our components and defined the route for our application as below:<\/p>\n<ul>\n<li>home &#8211; To redirect to <code>Home<\/code> component<\/li>\n<li>poll &#8211; To redirect to <code>IPLPoll<\/code> component<\/li>\n<li>results &#8211; To redirect to <code>PollResults<\/code> component<\/li>\n<\/ul>\n<p>One last thing is to define the navigation menu for our application. Open <code>\/app\/components\/navmenu\/navmenu.component.html<\/code> file and put the following code to it.<\/p>\n<pre>&lt;div class='main-nav'&gt;  \r\n    &lt;div class='navbar navbar-inverse'&gt;  \r\n        &lt;div class='navbar-header'&gt;  \r\n            &lt;button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'&gt;  \r\n                &lt;span class='sr-only'&gt;Toggle navigation&lt;\/span&gt;  \r\n                &lt;span class='icon-bar'&gt;&lt;\/span&gt;  \r\n                &lt;span class='icon-bar'&gt;&lt;\/span&gt;  \r\n                &lt;span class='icon-bar'&gt;&lt;\/span&gt;  \r\n            &lt;\/button&gt;  \r\n            &lt;a class='navbar-brand' [routerLink]=\"['\/home']\"&gt;IPLPollDemo&lt;\/a&gt;  \r\n        &lt;\/div&gt;  \r\n        &lt;div class='clearfix'&gt;&lt;\/div&gt;  \r\n        &lt;div class='navbar-collapse collapse'&gt;  \r\n            &lt;ul class='nav navbar-nav'&gt;  \r\n                &lt;li [routerLinkActive]=\"['link-active']\"&gt;  \r\n                    &lt;a [routerLink]=\"['\/home']\"&gt;  \r\n                        &lt;span class='glyphicon glyphicon-home'&gt;&lt;\/span&gt; Home  \r\n                    &lt;\/a&gt;  \r\n                &lt;\/li&gt;  \r\n                &lt;li [routerLinkActive]=\"['link-active']\"&gt;  \r\n                    &lt;a [routerLink]=\"['\/poll']\"&gt;  \r\n                        &lt;span class='glyphicon glyphicon-th-list'&gt;&lt;\/span&gt; Ipl Poll  \r\n                    &lt;\/a&gt;  \r\n                &lt;\/li&gt;  \r\n            &lt;\/ul&gt;  \r\n        &lt;\/div&gt;  \r\n    &lt;\/div&gt;  \r\n&lt;\/div&gt; \r\n<\/pre>\n<p>And that\u2019s it. We have created a Poll application using angular 5 and Entity Framework core.<\/p>\n<h2>Execution Demo<\/h2>\n<p>Press F5 to launch the application.<br \/>\nA web page will open as shown in the image below. Notice the URL showing route for our home component. The navigation menu on the left shows the navigation link for Ipl Poll page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16566 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164001\/Home_1.png\" alt=\"\" width=\"650\" height=\"247\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164001\/Home_1.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164001\/Home_1-560x213.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164001\/Home_1-360x137.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Click on IPL Poll in the navigation menu, the menu will redirect to Poll component showing all the team names along with a vote button beside them. Notice the URL has \u201c\/Poll\u201d appended to it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16567 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164033\/PollPage.png\" alt=\"\" width=\"650\" height=\"345\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164033\/PollPage.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164033\/PollPage-560x297.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164033\/PollPage-360x191.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Click on the vote button to vote for your favorite team. You will be redirected to the results page showing the poll results as a columnar chart.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16569 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164110\/Results_1.png\" alt=\"\" width=\"650\" height=\"411\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164110\/Results_1.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164110\/Results_1-560x354.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164110\/Results_1-360x228.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>Since this is the first vote, so it is showing 100% for one team. After submitting few votes across teams, you will see a chart similar to the one below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-16570 aligncenter\" src=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164145\/Results_2.png\" alt=\"\" width=\"650\" height=\"345\" srcset=\"https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164145\/Results_2.png 650w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164145\/Results_2-560x297.png 560w, https:\/\/wp-assets.highcharts.com\/www-highcharts-com\/blog\/wp-content\/uploads\/2018\/06\/06164145\/Results_2-360x191.png 360w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>We have created an online poll using ASP.NET Core, Angular 5 and Entity Framework core database first approach with the help of Visual Studio 2017 and SQL Server 2014. We also created a column chart using Highcharts to display the poll results.<\/p>\n<p>Get the source code from <a href=\"https:\/\/github.com\/AnkitSharma-007\/ASPCore.Angular.HighCharts\">Github<\/a> and play around. Please make sure to put your own connection string before executing the code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A complete tutorial on how to set up an online poll with ASP.net, Visual Studio 2017, SQL Server 2014, Angular 5, Entity Framework core and Highcharts<\/p>\n","protected":false},"author":230,"featured_media":21945,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"meta_title":"","meta_description":"","hc_selected_options":[],"footnotes":""},"categories":[1105,210],"tags":[555,822,1031],"coauthors":[755],"class_list":["post-16532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-integration","category-tutorials","tag-net","tag-angular","tag-javascript"],"_links":{"self":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/16532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/users\/230"}],"replies":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/comments?post=16532"}],"version-history":[{"count":1,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/16532\/revisions"}],"predecessor-version":[{"id":29137,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/16532\/revisions\/29137"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media\/21945"}],"wp:attachment":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media?parent=16532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/categories?post=16532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/tags?post=16532"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/coauthors?post=16532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}