Error while calling the API controller methods: Solution: Change your base class methods from public to protected so that they are not exposed to API endpoints: Replace: protected async Task<int> GetYourMethod() with this:More
The best programming blog.
Covering a wide array of programming topics.
Angular Unexpected synthetic property @fadeAnimation found
To fix this error, you need to make sure that one of the following modules is imported in your application: Once you have imported one of these modules, you need to make sure that there is corresponding configuration for the animation named @fadeAnimation defined in the animations field of the @Component decorator. For example, the…More
eslint ignore max len error for imports
If you have a long import with many characters exceeding es lint max length, you will have to add the following line to ignore that: // eslint-disable-next-line max-len The other solution is to add the following setting in .eslintrc.json file present at the root of the solution: The complete file will look this:More
MySQL Select all columns with one alias column
Select all columns with one alias column in MySQL: If you try to run the above query you will get the following error: The solution is to add an alias to * in the above query: In the above query, we added the table name as an alias to * to fix the issue.More
mysql add column boolean default false
Below is the command to add a boolean data type column as default false to an existing table in MySQL:More
Karma Angular No value accessor for form control with unspecified name
Error while running ng test in an ANgular project: No value accessor for form control with unspecified name The reason could be because of missing modules in imports of spec file. Please find the modulf being used in the component and add all those modules in the imports of spec file.More
Karma No binary form ChromeHeadless
Error while running ng test with karma: Solution: The solution to fix No binary for ChromeHeadless browser on your platform issue is to add the following code at the top of the file in karma.conf.js: The karma.conf.js file will look like this:More
Angular Error: A collection and schematic is required during execution
Error while adding a new component in Angular: Error: A collection and schematic is required during execution. The issue could be because of a missing component argument in ng g command, example: The solution is to add c as a component argument in your command:More
JavaScript Find an item in the array of objects
Below is an example of finding an item from an array in JavaScript, we can use .find over an array to do that. The output itemFromArray will be the item we found with the desired firstName.More
Bootstrap align vertically center on the screen
You can use the following HTML to align items / div vertically center on the screen:More