diff --git a/example/builtins/bundle.json b/example/builtins/bundle.json index 5aa0f821a0..d43a659de8 100644 --- a/example/builtins/bundle.json +++ b/example/builtins/bundle.json @@ -3,7 +3,11 @@ "description": "Example showing how to declare extensions with built-in support from Angular.", "extensions": { "controllers": [ - + { + "key": "ExampleController", + "implementation": "ExampleController.js", + "depends": [ "$scope" ] + } ], "directives": [ diff --git a/example/builtins/res/templates/example.html b/example/builtins/res/templates/example.html index 2aceaa7d30..8323a4f7c9 100644 --- a/example/builtins/res/templates/example.html +++ b/example/builtins/res/templates/example.html @@ -1 +1,2 @@ -
Hello, world! I am the default route.
\ No newline at end of file +Hello, world! I am the default route.
+My controller has told me: "{{phrase}}"
\ No newline at end of file diff --git a/example/builtins/src/ExampleController.js b/example/builtins/src/ExampleController.js new file mode 100644 index 0000000000..57defc0eaf --- /dev/null +++ b/example/builtins/src/ExampleController.js @@ -0,0 +1,21 @@ +/*global define,Promise*/ + +/** + * Module defining ExampleController. Created by vwoeltje on 11/4/14. + */ +define( + [], + function () { + "use strict"; + + /** + * + * @constructor + */ + function ExampleController($scope) { + $scope.phrase = "I am a controller."; + } + + return ExampleController; + } +); \ No newline at end of file