In this example below you will see how to do a Directive with some HTML / CSS and Javascript

This awesome code was written by rsids, you can see more from this user in the personal repository.
You can find the original code on
Copyright rsids ©
  • HTML
  • CSS
  • JavaScript
    <div ng-app="demo">
  <kitten />

/*Downloaded from */

/*Downloaded from */
    angular.module('demo', []).directive('kitten', kitten);

function kitten() {
  return {
    restrict: 'E', // Only allow as an element
    scope: false, // Don't create an isolate scope
    template: '<img src="" />' // Setup template