Skip to content

Instantly share code, notes, and snippets.

View chy600's full-sized avatar

Chengshu Yu chy600

View GitHub Profile
@chy600
chy600 / angularjs_directive_attribute_explanation.md
Created May 21, 2020 14:59 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>