36 lines
1008 B
HTML
36 lines
1008 B
HTML
<html>
|
|
<head>
|
|
<meta charset="utf8">
|
|
<title>Exercice manipulation $scope et contrôleur</title>
|
|
</head>
|
|
<!-- Déclaration de l'application -->
|
|
<body ng-app="Exo">
|
|
|
|
<div ng-controller="MainCtrl">
|
|
<h2>Contrôleur Parent</h2>
|
|
<label>Nombre A</label><input type="number" ng-model="numberA"/><br />
|
|
<label>Nombre B</label><input type="number" ng-model="numberB"/>
|
|
<hr />
|
|
|
|
<div ng-controller="ACtrl">
|
|
<h2>Contrôleur A</h2>
|
|
<label>Nombre A</label><input type="number" ng-model="numberA"/><br />
|
|
<label>Nombre B</label><input type="number" ng-model="numberB"/>
|
|
</div>
|
|
<hr />
|
|
|
|
<div ng-controller="BCtrl">
|
|
<h2>Contrôleur B</h2>
|
|
<label>Nombre A</label><input type="number" ng-model="numberA"/><br />
|
|
<label>Nombre B</label><input type="number" ng-model="numberB"/>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Import de du framework Angular -->
|
|
<script src="../node_modules/angular/angular.js"></script>
|
|
<script src="app.js"></script>
|
|
|
|
</body>
|
|
</html>
|