【发布时间】:2017-01-29 18:01:35
【问题描述】:
html代码
<div style="position: absolute; bottom: 0px; width: 100%">
<div style="text-align: center">
<div>
{{great}}
</div>
<form>
<div class="list">
<div class="list list-inset">
<label class="item item-input">
<input type="text" class="form-control input-lg" height="20" placeholder="Add Note" ng-model="searchText">
</label>
<button class="button button-block" ng-click="addTag()">Add Note</button>
</div>
</div>
</form>
app.js
$scope.searchText =" ";
$scope.great = "Note Here";
$scope.addTag = function () {
$scope.great == $scope.searchText;
};
我正在尝试为我创建的任务添加注释。这是我的应用程序:
当您单击任务并单击一个便笺时,它应该会在彼此之上创建一个带有分钟时间戳的便笺。
【问题讨论】:
-
那么问题是什么?
-
正如您在链接中看到的,当我单击添加注释时没有任何反应。
-
使用
$scope.great = $scope.searchText;而不是$scope.great == $scope.searchText;