Blog: 2016 February

Angular 2: Convert input values to the correct type with a TypeScript property decorator

February 24, 2016, (updated on March 1, 2016), 8 comments, Software Development

I recently played with Angular 2 and found an uncomfortable problem: Declaring an input property with a TypeScript type does not guarantee that the input value will always be of this type. This is because the Angular framework may update an input with a wrongly typed value and thus is able to “circumvent” the TypeScript type system. As a result, you may end up with strange and unexpected runtime errors. Let’s have a look at this simple Angular component: @Component({ selector: "my-component" }) export class MyComponent { @Input() enabled = true; showValue() { alert(typeof this.enabled); } } As shown in […] Read more...

Tags: , , , ,

Migrate a TFS repository to a VSTS Git repository

February 17, 2016, (updated on February 25, 2016), Software Development

To migrate a TFS repository to a Visual Studio Team Services Git repository, just perform the following steps: Install the Git command line tools so that the tools are registered in the Windows command prompt Install the Windows package manager Chocolatey Install the command line tool git-tfs with Chocolatey: choco install gittfs Create a local directory for the new Git repository and set the command line’s currect directory to this directory Clone the TFS repository into the local directory: git tfs clone https://[TFSSERVER] $/[REPOSITORYPATH] . --ignore-branches --debug Optionally add .gitignore and .gitattributes files to your Git repository Add the VSO […] Read more...

Tags: , , , , ,


  Page 1 of 1