Bonjour,

je me suis confronté à un problème que j'ai cherché un peu partout mais je n'ai pas eu la solution.
En effet, je developpe une application web (microservice) avec sprint Boot. mais le coté client je veux utiliser angularjs.

quand je veux appeler le controleur dans la page index.html, il souligne une erreur que je ne comprends pas donc je demande votre
contribution pour trouver une solution.
quand je met le curseur dessus affiche le message suivant:
Cannot find controller with name ProduitController.
pour plus d'infos je postule les fichiers necessaires:

fichier index.html
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<title>catalogue produit</title>
	<script type="text/javascript" src="https://code.angularjs.org/1.4.6/angular.min.js"></script>
	<script type="text/javascript" src=js/app.js></script>
</head>
<body ng-app="MyApp" ng-controller="ProduitController">
 
	<div class="container">
		<table>
			<tr>
				<th>ID</th><th>Désignation</th><th>Prix</th><th>Quantité</th>
			</tr>
			<tr ng-repeat="p in produits">
				<td>{{p.id}}</td>
				<td>{{p.designation}}</td>
				<td>{{p.prix}}</td>
				<td>{{p.quantite}}</td>
		</table>
	</div>
 
</body>
</html>

et model
fichier app.js
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
app.contoller("ProduitController", function($scope,$http){
	$scope.produits=null;
	$http.get("http://localhost:8080/produits")
	.success(function(data){
		$scope.produits=data;
	})
	.err(function(err){
		console.log(err);
	})
 
});
Merci
cordialement