Open CodingCarlos opened 7 years ago
When using scope to link attributes, if using syntax "=attr", you are creating a js binding between directive scope and original element. To create just a string (passig only the value), use the syntax "@attr" instead more info
return {
restrict: 'AE',
scope: {
max: '@max',
progress: '@progress',
error: '@error'
}
}
Directives
Full information about directives in Oficial Angular Documentation
Restrictions The restrict option is typically set to:
'A' - only matches attribute name 'E' - only matches element name 'C' - only matches class name 'M' - only matches comment These restrictions can all be combined as needed:
'AEC' - matches either attribute or element or class name