moved to angularAMD
This commit is contained in:
1 parent
823ecdd500
commit
c251432e54
13 files changed
+75
-166
No files matched your search
@@ -1,15 +1,6 @@
|
||||
define [], ->
|
||||
[
|
||||
"$scope"
|
||||
"$http"
|
||||
($scope, $http) ->
|
||||
define ["app"], (app) ->
|
||||
app.controller "MyCtrl1", ($scope) ->
|
||||
$scope.message = "Message from MyCtrl1"
|
||||
return
|
||||
|
||||
# You can access the scope of the controller from here
|
||||
$scope.welcomeMessage = "hey this is myctrl1.coffee!"
|
||||
$scope.okay = "okay?"
|
||||
|
||||
# because this has happened asynchroneusly we've missed
|
||||
# Angular's initial call to $apply after the controller has been loaded
|
||||
# hence we need to explicityly call it at the end of our Controller constructor
|
||||
$scope.$apply()
|
||||
]
|
||||
return
|
||||
Reference in new issue
Block a user