File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ watchLocationPath scope =
102102 _ -> extendScope { statusFilter: { } } scope
103103 in watch expr (return listener) false scope
104104
105- controller scope location = do
105+ todoctrl scope this location = do
106+ t <- readThis this
106107 path <- getPath location
107108 if S .length path == 0 then setPath " /" location else return " "
108109 watchRemainingCount scope
@@ -126,10 +127,3 @@ controller scope location = do
126127 , doneEditing: doneEditing scope
127128 , removeTodo: removeTodo scope
128129 , revertEditing: revertEditing scope } scope
129-
130- foreign import todoctrl
131- " /*@ngInject*/function todoctrl($scope, $location) { \
132- \ var impl = controller($scope)($location); \
133- \ return impl.apply(this, []); \
134- \ } "
135- :: forall e a . Scope a -> Location -> Eff e Unit
Original file line number Diff line number Diff line change 11module Todomvc.Main where
22
33import Angular.Module (controller , directive , ngmodule' )
4+ import Angular.DI (annotate )
45
56import Todomvc.Controller (todoctrl )
67import Todomvc.Escape (escape )
78import Todomvc.Focus (focus )
89
910main = do
1011 m <- ngmodule' " todomvc" []
11- controller " TodoCtrl" todoctrl m
12+ controller " TodoCtrl" (annotate todoctrl) m
1213 directive " todoEscape" escape m
1314 directive " todoFocus" focus m
You can’t perform that action at this time.
0 commit comments