Skip to content

Commit f79dd79

Browse files
committed
Change angular version to latest for controller to work properly
1 parent 0ef4081 commit f79dd79

File tree

1 file changed

+5
-4
lines changed
  • introToAngular/examples/snapshots/snapshot10

1 file changed

+5
-4
lines changed

introToAngular/examples/snapshots/snapshot10/index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
<html ng-app>
1+
<html ng-app = "myapp">
22
<head>
33
<meta charset="utf-8">
44
<title>Angular.js Example</title>
5-
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
5+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.0/angular.min.js"></script>
66
<script>
7-
function NameCtrl($scope){
7+
var app = angular.module("myapp");
8+
myapp.controller("NameCtrl",function($scope){
89
$scope.firstName = 'John';
910
$scope.lastName = 'Smith';
10-
}
11+
})
1112
</script>
1213
</head>
1314
<body ng-controller="NameCtrl">

0 commit comments

Comments
 (0)