如何使 ng-change 工作以将句子 1 更改为句子 2

how to make ng-change work to change sentence 1 to sentence 2

感谢您的帮助。 Sentence1: hello this is java ,点击它应该变成 Sentence2: Hello this is not java.

谁能给我一个好的解决方案,我有一个输入标签和复选框,ng-change 工作正常,但我想要与文本更改相同的逻辑。

<div ng-model="form.app" ng-change="updating()" >  
<input ng-model="form.app" ng-change="updating()" type="checkbox">

I need to change the text from yes to no on click.

使用AngularJS expressions:

<script src="//unpkg.com/angular/angular.js"></script>
<body ng-app>
    <input ng-model="form.app" type="checkbox">{{form.app}}
    <div>Hello, this is {{!form.app?'not':''}} Java</div>
</body>

有关详细信息,请参阅 AngularJS Developer Guide - Interpplation and data-binding