扫码一下
查看教程更方便
angularjs 表达式用于将应用程序数据绑定到 html。表达式写在双花括号内,例如 {{ expression }}
。表达式的行为类似于 ng-bind
指令。angularjs 表达式是纯 javascript 表达式,并在使用它们的地方输出数据。
expense on books : {{cost * quantity}} rs
hello {{student.firstname " " student.lastname}}!
roll no: {{student.rollno}}
marks(math): {{marks[3]}}
以下示例显示了上述所有表达式的使用
testangularjs.htm
angularjs expressions hello {{student.firstname " " student.lastname}}!
expense on books : {{cost * quantity}} rs
roll no: {{student.rollno}}
marks(math): {{marks[3]}}