Adding home directive tests

stable
Alejandro Alonso 2015-05-05 12:34:47 +02:00 committed by Juanfran
parent 4e7c1ce90f
commit ffa635ad85
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
HomeDirective = (homeService) ->
link = (scope, el, attrs, ctrl) ->
console.log 111111
scope.vm = {}
taiga.defineImmutableProperty(scope.vm, "workInProgress", () -> homeService.workInProgress)
@ -15,12 +16,14 @@ HomeDirective = (homeService) ->
issues = workInProgress.get("watching").get("issues")
scope.vm.watching = userStories.concat(tasks).concat(issues)
directive = {
return {
templateUrl: "home/home.html"
scope: {}
link: link
}
return directive
HomeDirective.$inject = [
"tgHomeService"
]
angular.module("taigaHome").directive("tgHome", ["tgHomeService", HomeDirective])
angular.module("taigaHome").directive("tgHome", HomeDirective)