﻿/// reference path="../Scripts/typings/angularjs/angular.d.ts" />


var contactsApp: any;

contactsApp.controller('ContactsController',
    function ContactsController($scope, contactData) {
        $scope.sortOrder = 'last';
        $scope.hideMessage = "Hide Details";
        $scope.showMessage = "Show Details";
        $scope.contacts = contactData.getContacts();
        $scope.toggleShowDetails = function (contact) {
            contact.showDetails = !contact.showDetails;
        }
    });


﻿/// reference path="../Scripts/typings/angularjs/angular.d.ts" />


var contactsApp: ng.IModule;

contactsApp.controller('ContactsController',
    function ContactsController($scope, contactData) {
        $scope.sortOrder = 'last';
        $scope.hideMessage = "Hide Details";
        $scope.showMessage = "Show Details";
        $scope.contacts = contactData.getContacts();
        $scope.toggleShowDetails = function (contact) {
            contact.showDetails = !contact.showDetails;
        }
    });


Change contactsApp from 'any' to 'angular.IModule'
Change contactsApp from 'any' to 'angular.IModule'

This gives us typing information about the contactsApp variable
