單向繫結屬性繫結

傳入文字值(不是物件),例如字串或數字。

子作用域獲取自己的值,如果它更新了值,則父作用域具有自己的舊值(子作用域不能修改 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>