Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis

gdyrrahitis/home.contoller.ts Secret

Created Jul 13, 2018
Embed
What would you like to do?
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