单向绑定属性绑定

传入文字值(不是对象),例如字符串或数字。

子作用域获取自己的值,如果它更新了值,则父作用域具有自己的旧值(子作用域不能修改 parens 作用域值)。当父范围值更改时,子范围值也将更改。每次在摘要调用时都会出现所有插值,而不仅仅是指令创建。

<one-way text="Simple text." <!-- 'Simple text.' -->
         simple-value="123" <!-- '123' Note, is actually a string object. -->
         interpolated-value="{{parentScopeValue}}" <!-- Some value from parent scope. You can't change parent scope value, only child scope value. Note, is actually a string object. -->
         interpolated-function-value="{{parentScopeFunction()}}" <!-- Executes parent scope function and takes a value. -->
         
         <!-- Unexpected usage. -->
         object-item="{{objectItem}}" <!-- Converts object|date to string. Result might be: '{"a":5,"b":"text"}'. -->
         function-item="{{parentScopeFunction}}"> <!-- Will be an empty string. -->
</one-way>