Tech Blog

Initialize data before Angular App Starts

By: Chris Dunn on Tue Jun 11, 2019 (4 min read)

It's generally a good idea to separate client configuration options from the rest of your code and display logic. These options could include API Endpoints, Language options, logging configuration or display settings. It makes it easier to customize these options for the various environments in the development process (development, test, staging, production).   Angular supports the concept of client configuration with environment files.  At first this may seem like a perfect place for these conf ...

Angular patchValue vs setValue

By: Chris Dunn on Tue Dec 4, 2018 (2 min read)

When creating model driven forms in Angular, for CRUD operations, you will need to map a data model to the FormGroup.  You can do this by manually setting each control value or you can use a function to map the entire data model to the FormGroup model.  At first glance of the documentation it looks like a good option would be setValue on the FormGroup object. myForm.setValue(formData, {onlySelf: true}); This will work if you have a matching control in the Form Group model (control name) for eac ...

Cleanup relative paths in Angular/Typescript

By: Chris Dunn on Tue Nov 6, 2018 (3 min read)

Angular projects usually start out pretty simple with a similarly simple folder structure.   Most likely in the beginning you simple drop all components, directives and services in the /app folder just to get things working.  As your program grows, you realize (hopefully) that if you're going to survive you will need to apply some sort of structure moving forward. This can cause it's own problems by turning our nice, short import statements from this: Import { MyComponent } from './mycomponent.c ...

Copyright 2019 Cidean, LLC. All rights reserved.

Proudly running Umbraco 7. This site is responsive with the help of Foundation 5.