Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
{{}在AngularJS中是如何工作的?_Angularjs_Angularjs Directive - Fatal编程技术网

{{}在AngularJS中是如何工作的?

{{}在AngularJS中是如何工作的?,angularjs,angularjs-directive,Angularjs,Angularjs Directive,我是个新手,我想知道{}在AngularJS中是如何工作的,比如: <p>Hi, {{user}}</p> 你好,{{user} 谢谢他们整理了您的数据 快速示例: 在控制器中: $scope.user = "Someone who don't read the basics in the manual"; 鉴于: <p>Hi, {{user}}</p> <input ng-model="user" /> <!--

我是个新手,我想知道{}在AngularJS中是如何工作的,比如:

    <p>Hi, {{user}}</p>
你好,{{user}


谢谢

他们整理了您的数据

快速示例:

在控制器中:

$scope.user = "Someone who don't read the basics in the manual";
鉴于:

<p>Hi, {{user}}</p>
<input ng-model="user" /> <!-- whenever this input field changes, the {{user}} above also changes -->
你好,{{user}


复制自基础:


{{}
是在HTML中指定数据绑定位置的一种声明方式。每当“用户”属性更改时,AngularJS将自动更新此文本

你到底想知道什么?具体一点。没有人会回答像“angular是如何工作的?”这样的问题。那么它就像javascript中的一个变量一样吗?我可以这样做吗:
open=document.body.split(“{”);close=open.split(“}”);打开。替换(“用户名”);关闭。替换(“”)