# Learning Angular: Expose an API on your directives

DevFeed: [Learning Angular: Expose an API on your directives](<https://devfeed.tech/articles/learning-angular-expose-an-api-on-your-directives-21245.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2015/06/learning-ng-expose-directive-api/>)

Published: 2015-06-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>), [API](<https://devfeed.tech/topics/api.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [api](<https://devfeed.tech/tags/api.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [learning](<https://devfeed.tech/tags/learning.md>)

## AI overview

A tutorial on exposing a programmatic API from Angular directives intended for reuse across projects. It compares using shared Angular services with exporting an API object from a directive, and favors shared services for cleaner separation while noting that an API object can be useful in some situations.

## Source excerpt

Lorem ipsum dolor sit amet