Formation Angular: exos supplémentaires
This commit is contained in:
35
javascript/angular/exercices/scope-2/index.html
Normal file
35
javascript/angular/exercices/scope-2/index.html
Normal file
@ -0,0 +1,35 @@
|
||||
<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>
|
Reference in New Issue
Block a user