你好我是新來的Framework7,我試圖使用與AngularJS的數據綁定,但我似乎無法得到它的工作。 我只是試圖綁定一個名稱從控制器到我的HTML,但我想我做錯了什麼... 在我的兩段代碼之下。Framework7與AngularJS數據綁定
<div class="pages navbar-through toolbar-through" ng-controller="DemoController">
<!-- Page, data-page contains page name-->
<div data-page="index" class="page">
<!-- Scrollable page content-->
<div class="page-content">
<div class="content-block-title">Welcome To My Awesome App</div>
<div class="content-block">
<div class="content-block-inner">
<p>Couple of worlds here because my app is so awesome!</p>
<p>Duis sed erat ac eros ultrices pharetra id ut tellus. Praesent rhoncus enim ornare ipsum aliquet ultricies. Pellentesque sodales erat quis elementum sagittis.</p>
</div>
</div>
<div class="content-block-title">What about simple navigation?</div>
<div class="list-block">
<ul>
<li><a href="about.html" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">{{ name }}</div>
</div>
</div></a></li>
<li><a href="services.html" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">Services</div>
</div>
</div></a></li>
<li><a href="form.html" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title">Form</div>
</div>
</div></a></li>
</ul>
</div>
<div class="content-block-title">Side panels</div>
<div class="content-block">
<div class="row">
<div class="col-50"><a href="#" data-panel="left" class="button open-panel">Left Panel</a></div>
<div class="col-50"><a href="#" data-panel="right" class="button open-panel">Right Panel</a></div>
</div>
</div>
</div>
</div>
</div>
<script>
function DemoController($scope)
{
$scope.name = "Dieter";
$scope.toggle = function(){
$scope.visible = !$scope.visible;
};
$scope.visible = true;
}
</script>