Answer the question
In order to leave comments, you need to log in
How to include angularjs module?
Good day, the application on angularjs does not work, there are 2 files, index.html and app.js
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Angular JS</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
</head>
<body ng-app="app">
<div ng-controller="MainCtrl">
<ul>
<li ng-repeat="item in items">
{{ item.name }}
</li>
</ul>
</div>
</body>
</html>
function MainCtrl ($scope) {
$scope.items = [{
name: 'Андрей',
id: 7297510
},{
name: 'Петр',
id: 0278916
},{
name: 'Иван',
id: 2389017
},{
name: 'Дмитрий',
id: 1000983
}];
}
var app = angular
.module('app')
.controller('MainCtrl', MainCtrl);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question