Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created July 13, 2018 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/862434d6ec9623f0dd7e85884f1ddebc to your computer and use it in GitHub Desktop.
Save gdyrrahitis/862434d6ec9623f0dd7e85884f1ddebc to your computer and use it in GitHub Desktop.
import { DepartmentService } from "../department.service/department.service";
export class HomeController {
constructor(
private departmentService: DepartmentService,
private $scope: IHomeControllerScope,
private $location: ng.ILocationService) {
$scope.departments = departmentService.getDepartments();
$scope.navigateToDepartment = this.navigateToDepartment;
}
navigateToDepartment = (id: number) => {
this.$location.path(`/department/${id}`);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment