Member-only story

Mapping StackOverflow into real-time assistance

Tom Smykowski
3 min readJul 26, 2020

--

Photo by FreePIk

Lately i started to wonder how to gain information about common programming bugs to create new rules for Assistant. It striked me, actually I can use StackOverflow. So I choose TypeScript (and Angular) as a starting point to find out, if it is possible to map StackOverflow as a problem base and provide real-time coding assistance with Visual Studio Code Assistant. Below you will see 5 most popular problems with Angular that Assistant can provide real-time while-coding solution to:

1. Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’

1414 votes on StackOverflow. If you want to bind to ngModel you will receive an error: “Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’”. It does not say what is the solution. With Assistant it becomes clear.

Assistant rule:

{
"regex": "\\[\\(ngModel\\)\\]",
"message": "Make sure to add FormsModule to imports inside app.module.ts"
}

Result:

2. Constructor should not have code inside (most of the time)

There are several reasons why constructor should not contain code in Angular. You can read more about it in this article and this StackOverflow question with…

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

🚀 Senior/Lead Frontend Engineer | Angular · Vue.js · React | Design Systems, UI/UX | Looking for a new project! 📩 contact@tomasz-smykowski.com

No responses yet