Skip to content

Commit 38172bb

Browse files
committed
explicit names for AngularJS injector
1 parent 5ea2d71 commit 38172bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

angularjs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import "github.com/gopherjs/gopherjs/js"
55
type Module struct{ *js.Object }
66

77
func (m *Module) NewController(name string, constructor func(scope *Scope)) {
8-
m.Call("controller", name, func(dollar_scope *js.Object) {
9-
constructor(&Scope{dollar_scope})
10-
})
8+
m.Call("controller", name, js.S{"$scope", func(scope *js.Object) {
9+
constructor(&Scope{scope})
10+
}})
1111
}
1212

1313
type Scope struct{ *js.Object }

0 commit comments

Comments
 (0)