B
B
bagerman2015-06-25 01:36:50
Angular
bagerman, 2015-06-25 01:36:50

Why doesn't the code work, Angular?

Hello!
Why does the code not work, although many tutorials give a similar example?
Maybe it's the versions of Angular?
jsbin.com/bujepekini/1/edit?html ,js,output
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kumanin, 2015-06-25
@bagerman

Maybe it's in the versions, it should be like this:

<html ng-app="myApp">
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
  <meta charset="UTF-8" />
  <title>Document</title>
  <script>
    var app = angular.module('myApp', []);
    app.controller('example', function($scope){
      $scope.home = 'Hello';
    });
  </script>
</head>
<body ng-controller="example">
  {{home}}
</body>
</html>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question