Created
April 29, 2015 07:38
-
-
Save fritzvd/f82e65c5d2c31ec00943 to your computer and use it in GitHub Desktop.
controller in the html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body ng-app="myApp"> | |
<div ng-controller="MyFavoriteCtrl as ctrl"> | |
{{ ctrl.superspecialvar }} | |
</div> | |
<script> | |
// initiate module, first argument is the name, second are dependencies | |
angular.module("myApp", []); | |
angular.module("myApp") | |
.controller("MyFavoriteCtrl", function () { | |
this.superspecialvar = "Hello World, 你好 土" | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment