Using ViewChild to focus on an element

angular comments suggest edit

The ViewChild function in Angular has many uses, but commonly used to access child elements or directives. Accessing an element allows us to make use of its native html and manipulate it.

Read More...

Using global variables in Angular

angular comments suggest edit

This is just a quick tip post about using configuration in your Angular app. The framework has already provided a simple and easy approach to this, so lets try it out.

Read More...

Injecting AppSettings.json into .Net Core Apps

netcore comments suggest edit

Back in the old days, we all used to insert connection strings and appsettings into our web.config file, then write a strongly type class to read in these values using the ConfigurationManager namespace. With .Net Core, things are slightly different, but thankfully strongly typed classes are handled for us. Lets see how.

Read More...

Access to XMLHttpRequest has been blocked by CORS policy

netcore comments suggest edit

Years ago I did all my development in Visual Studio. Back then, web apps had an MVC frontend and an API layer, all nicely packaged in one project. But with the latest clientside JS frameworks and .Net Core, the architecture of applications have changed. When Visual Studio 2017 first released, many developers reported issues editing projects with huge JS contents files. At the same time, Visual Studio Code was generating popularity fast as a lightweight, customisable editor, great for managing web applications. Nowadays my “goto” architecture for applications is developing Angular frontend web apps in Visual Studio Code, that communicate with a webapi developed in Visual Studio 2017. Web stuff in Code, .Net Core stuff in VS2017.

Read More...

Angular Startup Project

angular comments suggest edit

I wanted to write about how I get up and running with a new angular project. This is a real beginner post but also just to show I do things. My favourite editor for all client side JS and web is definitely Visual Studio Code. Its lightweight, fast and perfect for traversing a web project. So here goes!

Read More...