angularjs hello world

In this example below you will see how to do a angularjs hello world with some HTML / CSS and Javascript

我的第一个codepen angularjs程序

Thumbnail
This awesome code was written by 小杜, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 小杜 ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>angularjs  hello world</title>
   
  
  
  
  
</head>

<body>

  <div ng-app="myApp">
  <div ng-controller="MainController">
    {{msg}}
  </div>
</div>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.9/angular.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/xiaodu/angularjs-hello-world-gzqjdo */
var app = angular.module('myApp', []);
app.controller("MainController",function($scope){
  $scope.msg="Hello World!";
});

Comments