Extending JavaScript Arrays with TypeScript

I have been working on yet another Angular app for a few months.  Recently I found myself on a complex screen.  I discovered that I have to manipulate arrays in TypeScript quite a bit.  I found myself missing some functionality that I am accustomed to in C#, such as Linq.  I also found some older …

Continue reading ‘Extending JavaScript Arrays with TypeScript’ »

TypeScript Models Creation via T4 Templates

In light of what I posted yesterday about reducing the amount of TypeScript I write, I wanted to talk about another aspect of reducing the amount of TypeScript code.  Once common task is to create TypeScript models for your Angular application that match what your server expects.  You generate your TypeScript models for your .NET …

Continue reading ‘TypeScript Models Creation via T4 Templates’ »

Writing Less TypeScript Code in Angular Apps

I have been working on a number of Angular apps in the past 2 years, since I first heard about Angular and started studying the technology.  I wrote my first TypeScript app using TypeScript 0.4, which also used Angular about 1.5 years ago.  I blogged about my experiences previously quite a few times.  Here is …

Continue reading ‘Writing Less TypeScript Code in Angular Apps’ »

Generics In TypeScript

In this post I want to explore all the functionality available in TypeScript to use generics. Let’s start with the simples example of creating strongly types arrays.  module generics {        class Person {        name: string;        parents: Person[];    } } Now, you can only add a person to parents collection.  It is very simple, but you cannot for example add a …

Continue reading ‘Generics In TypeScript’ »

Talks at CodeStock 2014

I spoke at CodeStock yesterday.  I believe this was my 5th year at the conference.  I always enjoy it.  I attended a number of talks myself and hang out with some folks.  I saw a bunch of attendees I met before, and it is nice to see them and be recognized. I did two talks. …

Continue reading ‘Talks at CodeStock 2014’ »

VS Live 2014 Chicago

Yesterday I spoke at Visual Studio Live event in Chicago.   I presented two talks, really on the same topic – building web applications with TypeScript and Angular.  My demos and presentations actually touched on a number of other technologies – Entity Framework, Web Api, ASP.NET MVC.  I wanted to post the slides and demos. Build …

Continue reading ‘VS Live 2014 Chicago’ »

Testing Controllers in Angular with Jasmine

I blogged a while ago about how to build ad-hoc test page for Angular / ASP.NET MVC Application.  In this post I will try to establish a pattern for testing Angular controllers using TypeScript and Jasmine.  Before you start, you have to use Nuget and bring in jasmine framework. I used version 1.3, as I …

Continue reading ‘Testing Controllers in Angular with Jasmine’ »

Building Recursive Interfaces in Angular and Entity Framework

I had an interesting problem to study today.  The business problem is quite simple.  I want to allow users to enter a number of items on a screen that are recursively related.  To illustrate here is what I have in mind Item 1 Item 1.1 Item 1.2 Item 1.2.1 Etc.. I do not want to …

Continue reading ‘Building Recursive Interfaces in Angular and Entity Framework’ »

Angular and Focus Setting on New HTML Elements

I had to deal with an interesting problem this weekend.  I was working on a screen for a demo project that was using Angular ngRepeat directive to display multiple fields for a sub-entity of a main screen.  Something similar to the demo below. The behavior I wanted to see is as follows.  When a user …

Continue reading ‘Angular and Focus Setting on New HTML Elements’ »

Using SSRS In Angular / ASP.NET MVC Application

I blogged a long time ago about a pattern on how to show reports in an ASP.NET MVC application.  I have received a lot of request to share code, but I have lost the source code when I reimaged my machine.  Rather than recreating this from scratch, I decided to take a more advanced route …

Continue reading ‘Using SSRS In Angular / ASP.NET MVC Application’ »