<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
    xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Angular Service</Title>
      <Author>John Papa</Author>
      <Description>Template for adding an Angular Service</Description>
      <Shortcut>ngservice</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>id</ID>
          <ToolTip>Replace with a variable to hold the service name.</ToolTip>
          <Default>serviceId</Default>
        </Literal>
        <Literal>
          <ID>module</ID>
          <ToolTip>Replace with a module name variable.</ToolTip>
          <Default>app</Default>
        </Literal>
        <Literal>
          <ID>service</ID>
          <ToolTip>Replace with the string name of the service.</ToolTip>
          <Default>customService</Default>
        </Literal>
        <Literal>
          <ID>dependency</ID>
          <ToolTip>Replace with the dependency for service.</ToolTip>
          <Default>config</Default>
        </Literal>
        <Literal>
          <ID>member1</ID>
          <ToolTip>Replace with the name of a member of the service.</ToolTip>
          <Default>getData</Default>
        </Literal>
      </Declarations>
      <Code Language="JavaScript">
        <![CDATA[
(function () {
    'use strict';
    var $id$ = '$service$';
    angular.module('$module$').factory($id$, ['$dependency$', $service$]);

    function $service$($dependency$) {
        var service = {
            $member1$: $member1$
        };

        return service;

        function $member1$() {

        }

        //#region Internal Methods        

        //#endregion
    }
})();
                ]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>