Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
817 lines (810 sloc) 43.3 KB
---
redirect_from: /docs/1.0.19/classes/resolve.resolvable.html
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Resolvable | @uirouter/angularjs</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/uirouter.css">
<script src="../assets/js/modernizr.js"></script>
<script src="../assets/js/reset.js"></script>
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@uirouter/angularjs</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<!--
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
-->
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Internal UI-Router API</label>
<!--
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
-->
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">@uirouter/angularjs</a>
</li>
<li>
<a href="../modules/resolve.html">resolve</a>
</li>
<li>
<a href="resolve.resolvable.html">Resolvable</a>
</li>
</ul>
<h1>Class Resolvable</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The basic building block for the resolve system.</p>
</div>
<p>Resolvables encapsulate a state&#39;s resolve&#39;s resolveFn, the resolveFn&#39;s declared dependencies, the wrapped (.promise),
and the unwrapped-when-complete (.data) result of the resolveFn.</p>
<p>Resolvable.get() either retrieves the Resolvable&#39;s existing promise, or else invokes resolve() (which invokes the
resolveFn) and returns the resulting promise.</p>
<p>Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first
parameter to those fns.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Resolvable</span>
</li>
</ul>
</section>
<section class="tsd-panel">
<h3>Implements</h3>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/resolve.resolvableliteral.html" class="tsd-signature-type">ResolvableLiteral</a></li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="resolve.resolvable.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#data" class="tsd-kind-icon">data</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#deps" class="tsd-kind-icon">deps</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#policy" class="tsd-kind-icon">policy</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#promise" class="tsd-kind-icon">promise</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#resolvefn" class="tsd-kind-icon">resolve<wbr>Fn</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#resolved" class="tsd-kind-icon">resolved</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="resolve.resolvable.html#token" class="tsd-kind-icon">token</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="resolve.resolvable.html#clone" class="tsd-kind-icon">clone</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="resolve.resolvable.html#get" class="tsd-kind-icon">get</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="resolve.resolvable.html#getpolicy" class="tsd-kind-icon">get<wbr>Policy</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="resolve.resolvable.html#resolve" class="tsd-kind-icon">resolve</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="resolve.resolvable.html#tostring" class="tsd-kind-icon">to<wbr>String</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="resolve.resolvable.html#fromdata" class="tsd-kind-icon">from<wbr>Data</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<a name="constructor" class="tsd-anchor"></a>
<!--
<h3>constructor</h3>
-->
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Resolvable<span class="tsd-signature-symbol">(</span>resolvable<span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></li>
<li class="tsd-header">
<p> This constructor creates a Resolvable copy </p>
</li>
<li class="tsd-signature tsd-kind-icon">new <wbr>Resolvable<span class="tsd-signature-symbol">(</span>resolvable<span class="tsd-signature-symbol">: </span><a href="../interfaces/resolve.resolvableliteral.html" class="tsd-signature-type">ResolvableLiteral</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></li>
<li class="tsd-header">
<p> This constructor creates a new Resolvable from the plain old <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a> javascript object </p>
</li>
<li class="tsd-signature tsd-kind-icon">new <wbr>Resolvable<span class="tsd-signature-symbol">(</span>token<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, resolveFn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span>, deps<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any[]</span>, policy<span class="tsd-signature-symbol">?: </span><a href="../interfaces/resolve.resolvepolicy.html" class="tsd-signature-type">ResolvePolicy</a>, data<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></li>
<li class="tsd-header">
<p> This constructor creates a new <code>Resolvable</code> </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>This constructor creates a Resolvable copy</p>
</div>
<h4 id="example-">Example:</h4>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> resolvable1 = <span class="hljs-keyword">new</span> Resolvable(<span class="hljs-string">'mytoken'</span>, http =&gt; http.get(<span class="hljs-string">'foo.json'</span>).toPromise(), [Http]);
<span class="hljs-keyword">var</span> resolvable2 = <span class="hljs-keyword">new</span> Resolvable(UserService, dep =&gt; <span class="hljs-keyword">new</span> UserService(dep.data), [SomeDependency]);
<span class="hljs-keyword">var</span> resolvable1Clone = <span class="hljs-keyword">new</span> Resolvable(resolvable1);
</code></pre>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolvable <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L46">ui-router-core/src/resolve/resolvable.ts:46</a></li>
</ul>
</aside> </li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>This constructor creates a new Resolvable from the plain old <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a> javascript object</p>
</div>
<h4 id="example-">Example:</h4>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> resolvable1 = <span class="hljs-keyword">new</span> Resolvable(<span class="hljs-string">'mytoken'</span>, http =&gt; http.get(<span class="hljs-string">'foo.json'</span>).toPromise(), [Http]);
<span class="hljs-keyword">var</span> resolvable2 = <span class="hljs-keyword">new</span> Resolvable(UserService, dep =&gt; <span class="hljs-keyword">new</span> UserService(dep.data), [SomeDependency]);
<span class="hljs-keyword">var</span> resolvable1Clone = <span class="hljs-keyword">new</span> Resolvable(resolvable1);
</code></pre>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolvable <a href="../interfaces/resolve.resolvableliteral.html" class="tsd-signature-type">ResolvableLiteral</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L49">ui-router-core/src/resolve/resolvable.ts:49</a></li>
</ul>
</aside> </li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>This constructor creates a new <code>Resolvable</code></p>
</div>
<h4 id="example-">Example:</h4>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> resolvable1 = <span class="hljs-keyword">new</span> Resolvable(<span class="hljs-string">'mytoken'</span>, http =&gt; http.get(<span class="hljs-string">'foo.json'</span>).toPromise(), [Http]);
<span class="hljs-keyword">var</span> resolvable2 = <span class="hljs-keyword">new</span> Resolvable(UserService, dep =&gt; <span class="hljs-keyword">new</span> UserService(dep.data), [SomeDependency]);
<span class="hljs-keyword">var</span> resolvable1Clone = <span class="hljs-keyword">new</span> Resolvable(resolvable1);
</code></pre>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>token <span class="tsd-signature-type">any</span></h5>
: <div class="tsd-comment tsd-typography">
<div class="lead">
<p>The new resolvable&#39;s injection token, such as <code>&quot;userList&quot;</code> (a string) or <code>UserService</code> (a class).
When this token is used during injection, the resolved value will be injected.</p>
</div>
</div>
</li>
<li>
<h5>resolveFn <span class="tsd-signature-type">Function</span></h5>
: <div class="tsd-comment tsd-typography">
<div class="lead">
<p>The function that returns the resolved value, or a promise for the resolved value</p>
</div>
</div>
</li>
<li>
<h5>deps: <span class="tsd-flag ts-flagOptional">Optional</span>&nbsp; <span class="tsd-signature-type">any[]</span></h5>
: <div class="tsd-comment tsd-typography">
<div class="lead">
<p>An array of dependencies, which will be injected into the <code>resolveFn</code></p>
</div>
</div>
</li>
<li>
<h5>policy: <span class="tsd-flag ts-flagOptional">Optional</span>&nbsp; <a href="../interfaces/resolve.resolvepolicy.html" class="tsd-signature-type">ResolvePolicy</a></h5>
: <div class="tsd-comment tsd-typography">
<div class="lead">
<p>the <a href="../interfaces/resolve.resolvepolicy.html">ResolvePolicy</a> defines when and how the Resolvable is processed</p>
</div>
</div>
</li>
<li>
<h5>data: <span class="tsd-flag ts-flagOptional">Optional</span>&nbsp; <span class="tsd-signature-type">any</span></h5>
: <div class="tsd-comment tsd-typography">
<div class="lead">
<p>Pre-resolved data. If the resolve value is already known, it may be provided here.</p>
</div>
</div>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L52">ui-router-core/src/resolve/resolvable.ts:52</a></li>
</ul>
</aside> </li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="data" class="tsd-anchor"></a>
<!--
<h3>data</h3>
-->
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a>.<a href="../interfaces/resolve.resolvableliteral.html#data">data</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L42">ui-router-core/src/resolve/resolvable.ts:42</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="deps" class="tsd-anchor"></a>
<!--
<h3>deps</h3>
-->
<div class="tsd-signature tsd-kind-icon">deps<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any[]</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a>.<a href="../interfaces/resolve.resolvableliteral.html#deps">deps</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L40">ui-router-core/src/resolve/resolvable.ts:40</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="policy" class="tsd-anchor"></a>
<!--
<h3>policy</h3>
-->
<div class="tsd-signature tsd-kind-icon">policy<span class="tsd-signature-symbol">:</span> <a href="../interfaces/resolve.resolvepolicy.html" class="tsd-signature-type">ResolvePolicy</a></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a>.<a href="../interfaces/resolve.resolvableliteral.html#policy">policy</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L38">ui-router-core/src/resolve/resolvable.ts:38</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="promise" class="tsd-anchor"></a>
<!--
<h3>promise</h3>
-->
<div class="tsd-signature tsd-kind-icon">promise<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> =&nbsp;undefined</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L44">ui-router-core/src/resolve/resolvable.ts:44</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="resolvefn" class="tsd-anchor"></a>
<!--
<h3>resolve<wbr>Fn</h3>
-->
<div class="tsd-signature tsd-kind-icon">resolve<wbr>Fn<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Function</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a>.<a href="../interfaces/resolve.resolvableliteral.html#resolvefn">resolveFn</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L39">ui-router-core/src/resolve/resolvable.ts:39</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="resolved" class="tsd-anchor"></a>
<!--
<h3>resolved</h3>
-->
<div class="tsd-signature tsd-kind-icon">resolved<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> =&nbsp;false</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L43">ui-router-core/src/resolve/resolvable.ts:43</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="token" class="tsd-anchor"></a>
<!--
<h3>token</h3>
-->
<div class="tsd-signature tsd-kind-icon">token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<div class="tsd-declaration">
</div>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/resolve.resolvableliteral.html">ResolvableLiteral</a>.<a href="../interfaces/resolve.resolvableliteral.html#token">token</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L37">ui-router-core/src/resolve/resolvable.ts:37</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="clone" class="tsd-anchor"></a>
<!--
<h3>clone</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L176">ui-router-core/src/resolve/resolvable.ts:176</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="get" class="tsd-anchor"></a>
<!--
<h3>get</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<span class="tsd-signature-symbol">(</span>resolveContext<span class="tsd-signature-symbol">: </span><a href="resolve.resolvecontext.html" class="tsd-signature-type">ResolveContext</a>, trans<span class="tsd-signature-symbol">?: </span><a href="transition.transition-1.html" class="tsd-signature-type">Transition</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li>
<li class="tsd-header">
<p> Gets a promise for this Resolvable&#39;s data. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Gets a promise for this Resolvable&#39;s data.</p>
</div>
<p>Fetches the data and returns a promise.
Returns the existing promise if it has already been fetched once.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolveContext <a href="resolve.resolvecontext.html" class="tsd-signature-type">ResolveContext</a></h5>
</li>
<li>
<h5>trans: <span class="tsd-flag ts-flagOptional">Optional</span>&nbsp; <a href="transition.transition-1.html" class="tsd-signature-type">Transition</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L168">ui-router-core/src/resolve/resolvable.ts:168</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getpolicy" class="tsd-anchor"></a>
<!--
<h3>get<wbr>Policy</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<wbr>Policy<span class="tsd-signature-symbol">(</span>state<span class="tsd-signature-symbol">: </span><a href="state.stateobject.html" class="tsd-signature-type">StateObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/resolve.resolvepolicy.html" class="tsd-signature-type">ResolvePolicy</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>state <a href="state.stateobject.html" class="tsd-signature-type">StateObject</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="../interfaces/resolve.resolvepolicy.html" class="tsd-signature-type">ResolvePolicy</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L95">ui-router-core/src/resolve/resolvable.ts:95</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="resolve" class="tsd-anchor"></a>
<!--
<h3>resolve</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">resolve<span class="tsd-signature-symbol">(</span>resolveContext<span class="tsd-signature-symbol">: </span><a href="resolve.resolvecontext.html" class="tsd-signature-type">ResolveContext</a>, trans<span class="tsd-signature-symbol">?: </span><a href="transition.transition-1.html" class="tsd-signature-type">Transition</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li>
<li class="tsd-header">
<p> Asynchronously resolve this Resolvable&#39;s data </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Asynchronously resolve this Resolvable&#39;s data</p>
</div>
<p>Given a ResolveContext that this Resolvable is found in:
Wait for this Resolvable&#39;s dependencies, then invoke this Resolvable&#39;s function
and update the Resolvable&#39;s state</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolveContext <a href="resolve.resolvecontext.html" class="tsd-signature-type">ResolveContext</a></h5>
</li>
<li>
<h5>trans: <span class="tsd-flag ts-flagOptional">Optional</span>&nbsp; <a href="transition.transition-1.html" class="tsd-signature-type">Transition</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L111">ui-router-core/src/resolve/resolvable.ts:111</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="tostring" class="tsd-anchor"></a>
<!--
<h3>to<wbr>String</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">to<wbr>String<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L172">ui-router-core/src/resolve/resolvable.ts:172</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="fromdata" class="tsd-anchor"></a>
<!--
<h3><span class="tsd-flag ts-flagStatic">Static</span> from<wbr>Data</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">from<wbr>Data<span class="tsd-signature-symbol">(</span>token<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>token <span class="tsd-signature-type">any</span></h5>
</li>
<li>
<h5>data <span class="tsd-signature-type">any</span></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="resolve.resolvable.html" class="tsd-signature-type">Resolvable</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/d461776/src/resolve/resolvable.ts#L46">ui-router-core/src/resolve/resolvable.ts:46</a></li>
</ul>
</aside> </li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../index.html"><em>@uirouter/angularjs</em></a>
</li>
<li class="label tsd-is-external">
<span>Public API</span>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/core.html">core</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/injectables.html">injectables</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/ng1.html">ng1</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/ng1_state_events.html">ng1_<wbr>state_<wbr>events</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/params.html">params</a>
</li>
<li class="current tsd-kind-external-module">
<a href="../modules/resolve.html">resolve</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/transition.html">transition</a>
</li>
<li class="label tsd-is-external">
<span>Internal UI-<wbr><wbr>Router API</span>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common.html">common</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_hof.html">common_<wbr>hof</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_predicates.html">common_<wbr>predicates</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_strings.html">common_<wbr>strings</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/directives.html">directives</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/hooks.html">hooks</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/path.html">path</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/state.html">state</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/trace.html">trace</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/url.html">url</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/vanilla.html">vanilla</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/view.html">view</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-external-module">
<a href="resolve.resolvable.html" class="tsd-kind-icon">Resolvable</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="resolve.resolvable.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#data" class="tsd-kind-icon">data</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#deps" class="tsd-kind-icon">deps</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#policy" class="tsd-kind-icon">policy</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#promise" class="tsd-kind-icon">promise</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#resolvefn" class="tsd-kind-icon">resolve<wbr>Fn</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#resolved" class="tsd-kind-icon">resolved</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="resolve.resolvable.html#token" class="tsd-kind-icon">token</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="resolve.resolvable.html#clone" class="tsd-kind-icon">clone</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="resolve.resolvable.html#get" class="tsd-kind-icon">get</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="resolve.resolvable.html#getpolicy" class="tsd-kind-icon">get<wbr>Policy</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="resolve.resolvable.html#resolve" class="tsd-kind-icon">resolve</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="resolve.resolvable.html#tostring" class="tsd-kind-icon">to<wbr>String</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="resolve.resolvable.html#fromdata" class="tsd-kind-icon">from<wbr>Data</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class tsd-parent-kind-external-module tsd-is-external">
<a href="resolve.resolvecontext.html" class="tsd-kind-icon">Resolve<wbr>Context</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
<a href="resolve.uiinjectorimpl.html" class="tsd-kind-icon">UIInjector<wbr>Impl</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/resolve.providerlike.html" class="tsd-kind-icon">Provider<wbr>Like</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/resolve.resolvableliteral.html" class="tsd-kind-icon">Resolvable<wbr>Literal</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/resolve.resolvepolicy.html" class="tsd-kind-icon">Resolve<wbr>Policy</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/resolve.html#policyasync" class="tsd-kind-icon">Policy<wbr>Async</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/resolve.html#policywhen" class="tsd-kind-icon">Policy<wbr>When</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
<a href="../modules/resolve.html#all_whens" class="tsd-kind-icon">ALL_<wbr>WHENS</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
<a href="../modules/resolve.html#eager_whens" class="tsd-kind-icon">EAGER_<wbr>WHENS</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-external">
<a href="../modules/resolve.html#native_injector_token" class="tsd-kind-icon">NATIVE_<wbr>INJECTOR_<wbr>TOKEN</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-external tsd-is-not-exported">
<a href="../modules/resolve.html#whens" class="tsd-kind-icon">whens</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-external-module">
<a href="../modules/resolve.html#defaultresolvepolicy" class="tsd-kind-icon">default<wbr>Resolve<wbr>Policy</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-external-module tsd-is-external">
<a href="../modules/resolve.html#resolvepolicies" class="tsd-kind-icon">resolve<wbr>Policies</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>
You can’t perform that action at this time.