I have developed a directive for displaying SVG icons and now I want to use this icon directive within another directive.
Icon directive:
<icon p="shopping-add"></icon>
What I am aiming for:
app.directive("product", function() {
return {
restrict : "E",
require: 'ngModel',
scope:{
ngModel:"="
},
template : '<div><icon p="iconName"></icon></div>'
};
});
How can I achieve the nested directive functionality?