Adding home directive tests
parent
4e7c1ce90f
commit
ffa635ad85
|
@ -1,5 +1,6 @@
|
||||||
HomeDirective = (homeService) ->
|
HomeDirective = (homeService) ->
|
||||||
link = (scope, el, attrs, ctrl) ->
|
link = (scope, el, attrs, ctrl) ->
|
||||||
|
console.log 111111
|
||||||
scope.vm = {}
|
scope.vm = {}
|
||||||
taiga.defineImmutableProperty(scope.vm, "workInProgress", () -> homeService.workInProgress)
|
taiga.defineImmutableProperty(scope.vm, "workInProgress", () -> homeService.workInProgress)
|
||||||
|
|
||||||
|
@ -15,12 +16,14 @@ HomeDirective = (homeService) ->
|
||||||
issues = workInProgress.get("watching").get("issues")
|
issues = workInProgress.get("watching").get("issues")
|
||||||
scope.vm.watching = userStories.concat(tasks).concat(issues)
|
scope.vm.watching = userStories.concat(tasks).concat(issues)
|
||||||
|
|
||||||
directive = {
|
return {
|
||||||
templateUrl: "home/home.html"
|
templateUrl: "home/home.html"
|
||||||
scope: {}
|
scope: {}
|
||||||
link: link
|
link: link
|
||||||
}
|
}
|
||||||
|
|
||||||
return directive
|
HomeDirective.$inject = [
|
||||||
|
"tgHomeService"
|
||||||
|
]
|
||||||
|
|
||||||
angular.module("taigaHome").directive("tgHome", ["tgHomeService", HomeDirective])
|
angular.module("taigaHome").directive("tgHome", HomeDirective)
|
||||||
|
|
Loading…
Reference in New Issue