Is there a simple way to implement one-way binding in an angular directive? I've been searching for an easy example, but haven't had much luck. The documentation isn't very clear either:
& or &attr - allows you to execute an expression within the parent scope. If no attribute name is specified, it will assume the same as the local name. For instance, with a widget definition of scope: { localFn:'&myAttr' }, the isolate scope property localFn will reference a function wrapper for count = count + value expression. Sometimes, you may want to pass data from the isolated scope to the parent scope using an expression, which can be achieved by passing a map of local variable names and values into the expression wrapper function. For example, if the expression is increment(amount), you can specify the amount value by calling localFn({amount: 22}).