I’m following this simple step in my learning:
This is what I have. All dependencies have been downloaded to my computer and I am viewing the page through foundation watch, refreshing the web page after each save of the index.html page where I am working.
<!doctype html>
<html lang="en" ng-app="application">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation for Apps</title>
<link href="./assets/css/app.css" rel="stylesheet" type="text/css">
<script src="./assets/js/foundation.js"></script>
<script src="./assets/js/templates.js"></script>
<script src="./assets/js/routes.js"></script>
<script src="./assets/js/app.js"></script>
</head>
<body>
<!--
ng = Angular directive
-->
<div ng-app="test" ng-init="firstName='John'" style="margin:20px;">
<p>ng-model of input fields connects text to {{ }} and ng-bind 2:</p>
Name : <input type="text" ng-model="lastname" placeholder="last name"></p>
<p><span ng-bind="firstname"></span></p>
<p>Hello {{lastname}}</p>
</div>
</body>
</html>
Why doesn’t the ng-bind work? I suppose it is to immediately insert itself upon page refresh/load.