<html ng-app="app">
<body ng-controller="mainController">
<p>{{message}}</p>
</body>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js">
</script>
<script type="text/javascript">
// create the module and name it dbApp
var app = angular.module('app');
// create the controller and inject Angular's $scope
app.controller('mainController', function($scope) {
// create a message to display in our view
$scope.message = 'Hello world';
});
</script>
</html>
Angular Hello world demo.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.