In this example, we are using Html Attribute
,Html element
and Html class
type directive in the same directive that will display page header. It means we can use our directive as a html element, attribute and as well as class too. We have a directive with name pageHeader
and defined its parameter like restrict: 'AEC', which mean this will work as “Html attribute”, "Html element" and "Html class" type directive. Example:
, and