<!doctype html>
<html lang="en" ng-app="docsApp" ng-strict-di ng-controller="DocsController">
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="Description"
        content="AngularJS is what HTML would have been, had it been designed for building web-apps.
                 Declarative templates with data-binding, MVC, dependency injection and great
                 testability story all implemented with pure client-side JavaScript!">
  <meta name="fragment" content="!">
  <title ng-bind-template="AngularJS: {{ currentArea.name }}: {{ currentPage.name || 'Error: Page not found'}}">AngularJS</title>

  <script type="text/javascript">
    // dynamically add base tag as well as css and javascript files.
    // we can't add css/js the usual way, because some browsers (FF) eagerly prefetch resources
    // before the base attribute is added, causing 404 and terribly slow loading of the docs app.
    (function() {
      var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
          rUrl = /(#!\/|api|guide|misc|tutorial|error|index[^\.]*\.html).*$/,
          baseUrl = location.href.replace(rUrl, indexFile),
          production = location.hostname === 'docs.angularjs.org',
          headEl = document.getElementsByTagName('head')[0],
          sync = true;

      addTag('base', {href: baseUrl});


      addTag('link', {rel: 'stylesheet', href: 'components/bootstrap-3.1.1/css/bootstrap.min.css', type: 'text/css'});
      addTag('link', {rel: 'stylesheet', href: 'css/prettify-theme.css', type: 'text/css'});
      addTag('link', {rel: 'stylesheet', href: 'css/angular-topnav.css', type: 'text/css'});
      addTag('link', {rel: 'stylesheet', href: 'css/docs.css', type: 'text/css'});
      addTag('link', {rel: 'stylesheet', href: 'css/animations.css', type: 'text/css'});
      

      addTag('script', {src: 'components/jquery-3.2.1/jquery.js' }, sync);
      addTag('script', {src: '../angular.min.js' }, sync);
      addTag('script', {src: '../angular-resource.min.js' }, sync);
      addTag('script', {src: '../angular-route.min.js' }, sync);
      addTag('script', {src: '../angular-cookies.min.js' }, sync);
      addTag('script', {src: '../angular-sanitize.min.js' }, sync);
      addTag('script', {src: '../angular-touch.min.js' }, sync);
      addTag('script', {src: '../angular-animate.min.js' }, sync);
      addTag('script', {src: 'components/marked-0.3.6/lib/marked.js' }, sync);
      addTag('script', {src: 'js/angular-bootstrap/dropdown-toggle.min.js' }, sync);
      addTag('script', {src: 'components/lunr-0.7.2/lunr.min.js' }, sync);
      addTag('script', {src: 'components/google-code-prettify-1.0.1/src/prettify.js' }, sync);
      addTag('script', {src: 'components/google-code-prettify-1.0.1/src/lang-css.js' }, sync);
      addTag('script', {src: 'js/current-version-data.js' }, sync);
      addTag('script', {src: 'js/all-versions-data.js' }, sync);
      addTag('script', {src: 'js/pages-data.js' }, sync);
      addTag('script', {src: 'js/nav-data.js' }, sync);
      addTag('script', {src: 'js/docs.min.js' }, sync);
      

      function addTag(name, attributes, sync) {
        var el = document.createElement(name),
            attrName;

        for (attrName in attributes) {
          el.setAttribute(attrName, attributes[attrName]);
        }

        sync ? document.write(outerHTML(el)) : headEl.appendChild(el);
      }

      function outerHTML(node){
        // if IE, Chrome take the internal method otherwise build one
        return node.outerHTML || (
            function(n){
                var div = document.createElement('div'), h;
                div.appendChild(n);
                h = div.innerHTML;
                div = null;
                return h;
            })(node);
      }
    })();

    // GA asynchronous tracker
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-8594346-3']);
    _gaq.push(['_setDomainName', '.angularjs.org']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
</head>
<body class="homepage">
  <div id="wrapper">
    <header class="header">
      <nav id="navbar-main" class="navbar navbar-fixed-top">
        <div class="navbar-inner" ng-controller="DocsSearchCtrl">
          <div class="container">
            <h1 class="brand"><a href="http://angularjs.org"><img width="117" height="30" src="img/angularjs-for-header-only.svg" alt="AngularJS"></a></h1>

            <form class="navbar-search" ng-submit="submit()">
              <i class="glyphicon glyphicon-search search-icon"></i>
              <input type="text" name="as_q" class="search-query" placeholder="SEARCH"
                 ng-focus="focus=true"
                 ng-blur="focus=false"
                 ng-change="search(q)"
                 ng-model="q"
                 ng-model-options="{debounce: 150}"
                 docs-search-input
                 autocomplete="off">
            </form>

            <ul class="nav navbar-nav">
              <li class="dropdown" uib-dropdown>
                <a href="#" class="dropdown-toggle" uib-dropdown-toggle>Learn</a>
                <ul class="dropdown-menu" uib-dropdown-menu>
                  <li><a href="tutorial">Tutorial</a></li>
                  <li><a href="misc/faq">FAQ</a></li>
                  <li><a href="https://www.youtube.com/user/angularjs">Videos</a></li>
                  <li><a href="http://angular.codeschool.com/">Free Course</a></li>
                  <li><a href="https://www.madewithangular.com/">Case Studies</a></li>
                </ul>
              </li>
              <li class="dropdown" uib-dropdown>
                <a href="#" class="dropdown-toggle" uib-dropdown-toggle>Develop</a>
                <ul class="dropdown-menu" uib-dropdown-menu>
                  <li><a href="guide">Developer Guide</a></li>
                  <li><a href="api">API Reference</a></li>
                  <li><a href="error">Error Reference</a></li>
                  <li><a href="misc/contribute">Contribute</a></li>
                  <li><a href="https://github.com/angular/angular-seed">Seed App project template</a></li>
                  <li><a href="https://github.com/angular/angular.js">GitHub</a></li>
                  <li><a href="https://github.com/angular/angular.js/blob/master/CHANGELOG.md">Changelog</a></li>
                  <li><a href="http://code.angularjs.org/">Download</a></li>
                </ul>
              </li>
              <li class="dropdown" uib-dropdown>
                <a href="#" class="dropdown-toggle" uib-dropdown-toggle>Discuss</a>
                <ul class="dropdown-menu" uib-dropdown-menu>
                  <li><a href="http://blog.angularjs.org">Blog</a></li>
                  <li><a href="https://twitter.com/angular">Twitter</a></li>
                  <li><a href="https://plus.google.com/110323587230527980117">Google+</a></li>
                  <li><a href="https://github.com/angular/angular.js/issues">Feature &amp; Bug Tracker</a></li>
                  <li><a href="http://groups.google.com/group/angular">Mailing List</a></li>
                  <li><a href="http://webchat.freenode.net/?channels=angularjs&uio=d4">IRC</a></li>
                  <li><a href="https://gitter.im/angular/angular.js">Gitter</a></li>
                </ul>
              </li>
            </ul>

          </div>
          <div class="search-results-container" ng-show="hasResults">
            <div class="container">
              <div class="search-results-frame">
                <div ng-repeat="(key, value) in results track by key" class="search-results-group" ng-class="colClassName + ' col-group-' + key" ng-show="value.length > 0">
                  <h4 class="search-results-group-heading">{{ key }}</h4>
                  <ul class="search-results">
                    <li ng-repeat="item in value" class="search-result"><a ng-click="handleResultClicked($event)" ng-href="{{ item.path }}">{{ item.name }}</a></li>
                  </ul>
                </div>
              </div>
              <a href="" ng-click="hideResults()" class="search-close">
                <span class="glyphicon glyphicon-remove search-close-icon"></span> Close
              </a>
            </div>
          </div>
        </div>
      </nav>
      <nav id="navbar-notice" class="navbar navbar-fixed-top">
        <div class="navbar-inner">
          <div class="container">
            <p class="site-notice visible-phone">
              This site refers to AngularJS (v1.x). <a href="https://angular.io/">Go to the latest Angular</a>.
            </p>
            <p class="site-notice visible-desktop">
              This site and all of its contents are referring to AngularJS (version 1.x),
              if you are looking for the latest Angular, please visit <a href="https://angular.io/">angular.io</a>.
            </p>
          </div>
        </div>
      </nav>
      <nav id="navbar-sub" class="sup-header navbar navbar-fixed-top" scroll-y-offset-element>
        <div class="container main-grid main-header-grid">
          <div class="grid-left">
            <version-picker></version-picker>
          </div>
          <div class="grid-right">
            <ul class="nav-breadcrumb">
              <li ng-repeat="crumb in breadcrumb" class="nav-breadcrumb-entry naked-list">
                <span class="divider"> /</span>
                <a ng-href="{{crumb.url}}">{{crumb.name}}</a>
              </li>
            </ul>
          </div>
        </div>
      </nav>
    </header>

    <section role="main" class="container main-body">
      <div class="main-grid main-body-grid">
        <div class="grid-left">
          <a class="btn toc-toggle visible-xs" ng-click="toc=!toc">Show / Hide Table of Contents</a>
          <div class="side-navigation" ng-show="toc==true">
            <ul class="nav-list naked-list">
              <li ng-repeat="navGroup in currentArea.navGroups track by navGroup.name" class="nav-index-group">
                <a href="{{ navGroup.href }}" ng-class="navClass(navGroup)" class="nav-index-group-heading">{{ navGroup.name }}</a>
                <ul class="aside-nav">
                  <li ng-repeat="navItem in navGroup.navItems" ng-class="navClass(navItem)" class="nav-index-listing">
                    <a ng-if="navItem.extra.href" ng-class="navClass(navItem.extra)" href="{{navItem.extra.href}}">
                      {{navItem.extra.text}}<i ng-if="navItem.extra.icon" class="icon-{{navItem.extra.icon}}"></i>
                    </a>
                    <a tabindex="2" ng-class="linkClass(navItem)" href="{{navItem.href}}">{{navItem.name}}</a>
                  </li>
                </ul>
              </li>
            </ul>
            <a href="" ng-click="toc=false" class="toc-close visible-xs">
              <span class="glyphicon glyphicon-remove toc-close-icon"></span> Close
            </a>
          </div>
        </div>
        <div class="grid-right">
          <div id="loading" ng-show="loading">Loading...</div>
          <div ng-hide="loading" ng-include="partialPath" toc-collector autoscroll></div>
        </div>
      </div>
    </section>

    <footer class="footer">
      <div class="container">
        <p class="pull-right"><a back-to-top>Back to top</a></p>

        <p>
          Super-powered by Google ©2010-2018
          (<a id="version"
               ng-href="https://github.com/angular/angular.js/blob/master/CHANGELOG.md#{{versionNumber}}"
               ng-bind-template="v{{version}}" title="Changelog of this version of AngularJS">
           </a>)
        </p>
        <p>
          Code licensed under
          <a href="https://github.com/angular/angular.js/blob/master/LICENSE" target="_blank">The MIT License</a>.
          Documentation licensed under
          <a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.
        </p>
      </div>
    </footer>
  </div>
</body>
</html>
