\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Roman K. (Roman)} \pdfinfo{ /Title (angular-js-v1-3-0-services.pdf) /Creator (Cheatography) /Author (Roman K. (Roman)) /Subject (Angular Js v1.3.0 Services Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A37C68} \definecolor{LightBackground}{HTML}{F9F6F5} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Angular Js v1.3.0 Services Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Roman K. (Roman)} via \textcolor{DarkBackground}{\uline{cheatography.com/19465/cs/2484/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Roman K. (Roman) \\ \uline{cheatography.com/roman} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 11th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{animate}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The \$animate service provides rudimentary DOM manipulation functions to insert, remove and move elements within the DOM, as well as adding and removing classes. This service is the core service used by the ngAnimate \$animator service which provides high-level animation hooks for CSS and JavaScript. \newline % Row Count 6 (+ 6) Methods \newline % Row Count 7 (+ 1) {\bf{enter(element, parent, after, {[}done{]});}} \newline % Row Count 8 (+ 1) Inserts the element into the DOM either after the after element or as the first child within the parent element. Once complete, the done() callback will be fired (if provided). \newline % Row Count 12 (+ 4) {\emph{element}}, {\emph{DOMElement}}: the element which will be inserted into the DOM \newline % Row Count 14 (+ 2) {\emph{parent}}, {\emph{DOMElement}}: the parent element which will append the element as a child (if the after element is not present) \newline % Row Count 17 (+ 3) {\emph{after}}, {\emph{DOMElement}}: the sibling element which will append the element after itself \newline % Row Count 19 (+ 2) {\emph{done}}(optional), {\emph{Function=}}: callback function that will be called after the element has been inserted into the DOM \newline % Row Count 22 (+ 3) {\bf{move(element, parent, after, {[}done{]});}} \newline % Row Count 23 (+ 1) Moves the position of the provided element within the DOM to be placed either after the after element or inside of the parent element. Once complete, the done() callback will be fired (if provided). \newline % Row Count 27 (+ 4) {\emph{element}}, {\emph{DOMElement}}: the element which will be moved around within the DOM \newline % Row Count 29 (+ 2) {\emph{parent}}. {\emph{DOMElement}}: the parent element where the element will be inserted into (if the after element is not present) \newline % Row Count 32 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{animate (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{after}}, {\emph{DOMElement}}: the sibling element where the element will be positioned next to \newline % Row Count 2 (+ 2) {\emph{done}}(optional), {\emph{Function=}}: the callback function (if provided) that will be fired after the element has been moved to its new position \newline % Row Count 5 (+ 3) {\bf{addClass(element, className, {[}done{]});}} \newline % Row Count 6 (+ 1) Adds the provided className CSS class value to the provided element. Once complete, the done() callback will be fired (if provided). \newline % Row Count 9 (+ 3) {\emph{element}}, {\emph{DOMElement}}: the element which will have the className value added to it \newline % Row Count 11 (+ 2) {\emph{className}}, {\emph{string}}: the CSS class which will be added to the element \newline % Row Count 13 (+ 2) {\emph{done}}(optional), {\emph{Function=}}: the callback function (if provided) that will be fired after the className value has been added to the element \newline % Row Count 16 (+ 3) {\bf{removeClass(element, className, {[}done{]});}} \newline % Row Count 17 (+ 1) Removes the provided className CSS class value from the provided element. Once complete, the done() callback will be fired (if provided). \newline % Row Count 20 (+ 3) {\emph{element}}, {\emph{DOMElement}}: the element which will have the className value removed from it \newline % Row Count 22 (+ 2) {\emph{className}}, {\emph{string}}: the CSS class which will be removed from the element \newline % Row Count 24 (+ 2) {\emph{done}}(optional), {\emph{Function=}}: the callback function (if provided) that will be fired after the className value has been removed from the element \newline % Row Count 27 (+ 3) {\bf{setClass(element, add, remove, {[}done{]});}} \newline % Row Count 28 (+ 1) Adds and/or removes the given CSS classes to and from the element. Once complete, the done() callback will be fired (if provided). \newline % Row Count 31 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{animate (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{element}}, {\emph{DOMElement}}: the element which will have its CSS classes changed removed from it \newline % Row Count 2 (+ 2) {\emph{add}}, {\emph{string}}: the CSS classes which will be added to the element \newline % Row Count 4 (+ 2) {\emph{remove}}, {\emph{string}}: the CSS class which will be removed from the element \newline % Row Count 6 (+ 2) {\emph{done}}(optional), {\emph{Function=}}: the callback function (if provided) that will be fired after the CSS classes have been set on the element% Row Count 9 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{cacheFactory}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Factory that constructs Cache objects and gives access to them. \newline % Row Count 2 (+ 2) Usage: \newline % Row Count 3 (+ 1) \$cacheFactory(cacheId, {[}options{]}); \newline % Row Count 4 (+ 1) Arguments: \newline % Row Count 5 (+ 1) {\bf{cacheId}}, {\emph{string}}: Name or id of the newly created cache. \newline % Row Count 7 (+ 2) {\bf{options}}(optional), {\emph{object}}: Options object that specifies the cache behavior. Properties: \newline % Row Count 9 (+ 2) \{number=\} capacity — turns the cache into LRU cache. \newline % Row Count 11 (+ 2) Returns: \newline % Row Count 12 (+ 1) {\bf{object}}: Newly created cache object with the following set of methods: \newline % Row Count 14 (+ 2) {\emph{\{object\} info()}} — Returns id, size, and options of cache. \newline % Row Count 16 (+ 2) {\emph{\{\{}}\}\} put(\{string\} key, \{{\emph{\} value)}} — Puts a new key-value pair into the cache and returns it. \newline % Row Count 19 (+ 3) {\emph{\{\{}}\}\} get(\{string\} key)* — Returns cached value for key or undefined for cache miss. \newline % Row Count 21 (+ 2) {\emph{\{void\} remove(\{string\} key)}} — Removes a key-value pair from the cache. \newline % Row Count 23 (+ 2) {\emph{\{void\} removeAll()}} — Removes all cached values. \newline % Row Count 25 (+ 2) {\emph{\{void\} destroy()}} — Removes references to this cache from \$cacheFactory. \newline % Row Count 27 (+ 2) Methods: \newline % Row Count 28 (+ 1) {\bf{info();}} — Get information about all the caches that have been created \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{cacheFactory (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Returns: \newline % Row Count 1 (+ 1) {\bf{Object}} — key-value map of cacheId to the result of calling cache\#info \newline % Row Count 3 (+ 2) {\bf{get(cacheId);}} — Get access to a cache object by the cacheId used when it was created. \newline % Row Count 5 (+ 2) Parameters: \newline % Row Count 6 (+ 1) {\emph{cacheId}},{\emph{string}} — Name or id of a cache to access. \newline % Row Count 8 (+ 2) Returns: \newline % Row Count 9 (+ 1) {\emph{object}}: Cache object identified by the cacheId or undefined if no such cache.% Row Count 11 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{compile}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together. \newline % Row Count 3 (+ 3) Usage \newline % Row Count 4 (+ 1) \$compile(element, transclude, maxPriority); \newline % Row Count 5 (+ 1) Arguments \newline % Row Count 6 (+ 1) {\bf{element}}, {\emph{(string | DOMElement)}}: Element or HTML string to compile into a template function. \newline % Row Count 8 (+ 2) {\bf{transclude}}, {\emph{function(angular.Scope, cloneAttachFn=)}}: \newline % Row Count 10 (+ 2) function available to directives. \newline % Row Count 11 (+ 1) {\bf{maxPriority}}, {\emph{number}}: only apply directives lower than given priority (Only effects the root element(s), not their children) \newline % Row Count 14 (+ 3) Returns \newline % Row Count 15 (+ 1) {\bf{function(scope, cloneAttachFn=)}}: a link function which is used to bind template (a DOM element/tree) to a scope. Where: \newline % Row Count 18 (+ 3) {\emph{scope}} - A Scope to bind to. \newline % Row Count 19 (+ 1) {\emph{cloneAttachFn}} - If cloneAttachFn is provided, then the link function will clone the template and call the cloneAttachFn function allowing the caller to attach the cloned elements to the DOM document at the appropriate place. The cloneAttachFn is called as: {\emph{cloneAttachFn(clonedElement, scope)}} where: \newline % Row Count 26 (+ 7) {\emph{clonedElement}} - is a clone of the original element passed into the compiler. \newline % Row Count 28 (+ 2) {\emph{scope}} - is the current scope with which the linking function is working with. \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{compile (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Calling the linking function returns the element of the template. It is either the original element passed in, or the clone of the element if the cloneAttachFn is provided.% Row Count 4 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{interpolate}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Compiles a string with markup into an interpolation function. This service is used by the HTML \$compile service for data binding. \newline % Row Count 3 (+ 3) {\bf{Usage}} \newline % Row Count 4 (+ 1) \$interpolate(text, {[}mustHaveExpression{]}, {[}trustedContext{]}, {[}allOrNothing{]}); \newline % Row Count 6 (+ 2) {\bf{text}} - \{string\} - The text with markup to interpolate. \newline % Row Count 8 (+ 2) {\bf{mustHaveExpression}} (optional) - \{boolean\} - if set to true then the interpolation string must have embedded expression in order to return an interpolation function. Strings with no embedded expression will return null for the interpolation function. \newline % Row Count 14 (+ 6) {\bf{trustedContext}} (optional) - \{string\} - when provided, the returned function passes the interpolated result through \seqsplit{\$sce.getTrusted(interpolatedResult}, trustedContext) before returning it. Refer to the \$sce service that provides Strict Contextual Escaping for details. \newline % Row Count 20 (+ 6) {\bf{allOrNothing}} (optional) - \{boolean\} - if true, then the returned function returns undefined unless all embedded expressions evaluate to a value other than undefined. \newline % Row Count 24 (+ 4) {\bf{Returns}}: \newline % Row Count 25 (+ 1) {\bf{function(context)}} - an interpolation function which is used to compute the interpolated string. The function has these parameters: \newline % Row Count 28 (+ 3) - context: evaluation context for all expressions embedded in the interpolated text \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{interpolate (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Methods}}: \newline % Row Count 1 (+ 1) {\bf{startSymbol();}} - Symbol to denote the start of expression in the interpolated string. Defaults to \{\{. \newline % Row Count 4 (+ 3) Use \seqsplit{\$interpolateProvider\#startSymbol} to change the symbol. \newline % Row Count 6 (+ 2) Returns: \newline % Row Count 7 (+ 1) \{string\} - start symbol. \newline % Row Count 8 (+ 1) {\bf{endSymbol();}} - Symbol to denote the end of expression in the interpolated string. Defaults to \}\}. \newline % Row Count 11 (+ 3) Use \seqsplit{\$interpolateProvider\#endSymbol} to change the symbol.% Row Count 13 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{parse}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Converts Angular expression into a function. \newline % Row Count 1 (+ 1) Usage \newline % Row Count 2 (+ 1) {\bf{\$parse(expression);}} \newline % Row Count 3 (+ 1) Arguments: \newline % Row Count 4 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 6 (+ 2) Returns: \newline % Row Count 7 (+ 1) {\bf{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 9 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 12 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 15 (+ 3) The returned function also has the following properties: \newline % Row Count 17 (+ 2) {\emph{literal}} – \{boolean\} – whether the expression's top-level node is a JavaScript literal. \newline % Row Count 20 (+ 3) {\emph{constant}} – \{boolean\} – whether the expression is made entirely of JavaScript constant literals. \newline % Row Count 23 (+ 3) {\emph{assign}} – \{?function(context, value)\} – if the expression is assignable, this will be set to a function to change its value on the given context.% Row Count 27 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{controller}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\$controller service is responsible for instantiating controllers. \newline % Row Count 2 (+ 2) Usage \newline % Row Count 3 (+ 1) \$controller(constructor, locals); \newline % Row Count 4 (+ 1) Arguments \newline % Row Count 5 (+ 1) {\bf{constructor}}, {\emph{(function() | string)}}: If called with a function then it's considered to be the controller constructor function. Otherwise it's considered to be a string which is used to retrieve the controller constructor using the following steps: \newline % Row Count 11 (+ 6) - check if a controller with given name is registered via \$controllerProvider \newline % Row Count 13 (+ 2) - check if evaluating the string on the current scope returns a constructor \newline % Row Count 15 (+ 2) - if \seqsplit{\$controllerProvider\#allowGlobals}, check window{[}constructor{]} on the global window object (not recommended)% Row Count 18 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{exceptionHandler}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Any uncaught exception in angular expressions is delegated to this service. The default implementation simply delegates to \$log.error which logs it into the browser console. \newline % Row Count 4 (+ 4) Example: \newline % Row Count 5 (+ 1) \seqsplit{angular.module('exceptionOverride'}, {[}{]}).factory('\$exceptionHandler', function () \{` \newline % Row Count 7 (+ 2) return function (exception, cause) \{ \newline % Row Count 8 (+ 1) exception.message += (caused by "' + cause + '")';` \newline % Row Count 10 (+ 2) throw exception; \newline % Row Count 11 (+ 1) \}; \newline % Row Count 12 (+ 1) \}); \newline % Row Count 13 (+ 1) This example will override the normal action of \$exceptionHandler, to make angular exceptions fail hard when they happen, instead of just logging to the console. \newline % Row Count 17 (+ 4) Usage \newline % Row Count 18 (+ 1) \seqsplit{\$exceptionHandler(exception}, {[}cause{]}); \newline % Row Count 19 (+ 1) Arguments \newline % Row Count 20 (+ 1) {\bf{exception}}, {\emph{Error}}: Exception associated with the error. \newline % Row Count 22 (+ 2) {\bf{cause}} (optional), {\emph{string}}: optional information about the context in which the error was thrown.% Row Count 25 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\$sce is a service that provides Strict Contextual Escaping services to AngularJS. \newline % Row Count 2 (+ 2) Usage \newline % Row Count 3 (+ 1) \$sce(); \newline % Row Count 4 (+ 1) Methods: \newline % Row Count 5 (+ 1) {\bf{isEnabled();}} - Returns a boolean indicating if SCE is enabled. \newline % Row Count 7 (+ 2) Returns: \newline % Row Count 8 (+ 1) {\emph{Boolean}} - true if SCE is enabled, false otherwise. If you want to set the value, you have to do it at module config time on \$sceProvider. \newline % Row Count 11 (+ 3) {\bf{parseAs(type, expression);}} - Converts Angular expression into a function. This is like \$parse and is identical when the expression is a literal constant. Otherwise, it wraps the expression in a call to \$sce.getTrusted(type, result) \newline % Row Count 16 (+ 5) Parameters: \newline % Row Count 17 (+ 1) {\emph{type}} - \{string\} - The kind of SCE context in which this result will be used. \newline % Row Count 19 (+ 2) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 21 (+ 2) Returns: \newline % Row Count 22 (+ 1) {\emph{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 24 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 27 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 30 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{trustAs(type, value);}} - Delegates to \$sceDelegate.trustAs. As such, returns an object that is trusted by angular for use in specified strict contextual escaping contexts (such as ng-bind-html, ng-include, any src attribute interpolation, any dom event binding attribute interpolation such as for onclick, etc.) that uses the provided value. See * \$sce for enabling strict contextual escaping. \newline % Row Count 8 (+ 8) Parameters: \newline % Row Count 9 (+ 1) {\emph{type}} - \{string\} - The kind of context in which this value is safe for use. e.g. url, resource\_url, html, js and css. \newline % Row Count 12 (+ 3) {\emph{value}} - \{*\} - The value that that should be considered trusted/safe. \newline % Row Count 14 (+ 2) Returns \newline % Row Count 15 (+ 1) * - A value that can be used to stand in for the provided value in places where Angular expects a \$sce.trustAs() return value. \newline % Row Count 18 (+ 3) {\bf{trustAsHtml(value);}} - Shorthand method. \$sce.trustAsHtml(value) → \seqsplit{\$sceDelegate.trustAs(\$sce.HTML}, value) \newline % Row Count 21 (+ 3) Parameters: \newline % Row Count 22 (+ 1) {\emph{value}} - * - The value to trustAs. \newline % Row Count 23 (+ 1) Returns: \newline % Row Count 24 (+ 1) * - An object that can be passed to \seqsplit{\$sce.getTrustedHtml(value)} to obtain the original value. (privileged directives only accept expressions that are either literal constants or are the return value of \$sce.trustAs.) \newline % Row Count 29 (+ 5) {\bf{trustAsUrl(value);}} - Shorthand method. \$sce.trustAsUrl(value) → \seqsplit{\$sceDelegate.trustAs(\$sce.URL}, value) \newline % Row Count 32 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Parameters: \newline % Row Count 1 (+ 1) {\emph{value}} - * - The value to trustAs. \newline % Row Count 2 (+ 1) Returns: \newline % Row Count 3 (+ 1) * - An object that can be passed to \seqsplit{\$sce.getTrustedUrl(value)} to obtain the original value. (privileged directives only accept expressions that are either literal constants or are the return value of \$sce.trustAs.) \newline % Row Count 8 (+ 5) {\bf{trustAsResourceUrl(value);}} - Shorthand method. \seqsplit{\$sce.trustAsResourceUrl(value)} → \seqsplit{\$sceDelegate.trustAs(\$sce.RESOURCE\_URL}, value) \newline % Row Count 11 (+ 3) Parameters: \newline % Row Count 12 (+ 1) {\emph{value}} - * - The value to trustAs. \newline % Row Count 13 (+ 1) Returns: \newline % Row Count 14 (+ 1) * - An object that can be passed to \seqsplit{\$sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives only accept expressions that are either literal constants or are the return value of \$sce.trustAs.) \newline % Row Count 19 (+ 5) {\bf{trustAsJs(value);}} - Shorthand method. \$sce.trustAsJs(value) → \seqsplit{\$sceDelegate.trustAs(\$sce.JS}, value) \newline % Row Count 22 (+ 3) Parameters: \newline % Row Count 23 (+ 1) {\bf{value}}, * - The value to trustAs. \newline % Row Count 24 (+ 1) Returns: \newline % Row Count 25 (+ 1) * - An object that can be passed to \seqsplit{\$sce.getTrustedJs(value)} to obtain the original value. (privileged directives only accept expressions that are either literal constants or are the return value of \$sce.trustAs.) \newline % Row Count 30 (+ 5) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{getTrusted(type, maybeTrusted);}} - Delegates to \seqsplit{\$sceDelegate.getTrusted.} As such, takes the result of a \$sce.trustAs() call and returns the originally supplied value if the queried context type is a supertype of the created type. If this condition isn't satisfied, throws an exception. \newline % Row Count 6 (+ 6) Parameters: \newline % Row Count 7 (+ 1) {\emph{type}} - \{string\} - The kind of context in which this value is to be used. \newline % Row Count 9 (+ 2) {\emph{maybeTrusted}} - \{*\} - The result of a prior \$sce.trustAs call. \newline % Row Count 11 (+ 2) Returns: \newline % Row Count 12 (+ 1) * - The value the was originally provided to \$sce.trustAs if valid in this context. Otherwise, throws an exception. \newline % Row Count 15 (+ 3) {\bf{getTrustedHtml(value);}} - Shorthand method. \seqsplit{\$sce.getTrustedHtml(value)} → \seqsplit{\$sceDelegate.getTrusted(\$sce.HTML}, value) \newline % Row Count 18 (+ 3) Parameters: \newline % Row Count 19 (+ 1) {\bf{value}} - \{*\} - The value to pass to \$sce.getTrusted. \newline % Row Count 21 (+ 2) Returns: \newline % Row Count 22 (+ 1) * - The return value of \seqsplit{\$sce.getTrusted(\$sce.HTML}, value) \newline % Row Count 24 (+ 2) {\bf{getTrustedCss(value);}} - Shorthand method. \seqsplit{\$sce.getTrustedCss(value)} → \seqsplit{\$sceDelegate.getTrusted(\$sce.CSS}, value) \newline % Row Count 27 (+ 3) Parameters \newline % Row Count 28 (+ 1) {\bf{value}} - \{*\} - The value to pass to \$sce.getTrusted. \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Returns: \newline % Row Count 1 (+ 1) * - The return value of \seqsplit{\$sce.getTrusted(\$sce.CSS}, value) \newline % Row Count 3 (+ 2) {\bf{getTrustedUrl(value);}} - Shorthand method. \seqsplit{\$sce.getTrustedUrl(value)} → \seqsplit{\$sceDelegate.getTrusted(\$sce.URL}, value) \newline % Row Count 6 (+ 3) Parameters: \newline % Row Count 7 (+ 1) {\bf{value}} - \{*\} - The value to pass to \$sce.getTrusted. \newline % Row Count 9 (+ 2) Returns: \newline % Row Count 10 (+ 1) * - The return value of \seqsplit{\$sce.getTrusted(\$sce.URL}, value) \newline % Row Count 12 (+ 2) {\bf{getTrustedResourceUrl(value);}} - Shorthand method. \seqsplit{\$sce.getTrustedResourceUrl(value)} → \seqsplit{\$sceDelegate.getTrusted(\$sce.RESOURCE\_URL}, value) \newline % Row Count 15 (+ 3) Parameters: \newline % Row Count 16 (+ 1) {\bf{value}} - \{*\} - The value to pass to \seqsplit{\$sceDelegate.getTrusted.} \newline % Row Count 18 (+ 2) Returns: \newline % Row Count 19 (+ 1) * - The return value of \seqsplit{\$sce.getTrusted(\$sce.RESOURCE\_URL}, value) \newline % Row Count 21 (+ 2) {\bf{getTrustedJs(value);}} - Shorthand method. \seqsplit{\$sce.getTrustedJs(value)} → \seqsplit{\$sceDelegate.getTrusted(\$sce.JS}, value) \newline % Row Count 24 (+ 3) Parameters: \newline % Row Count 25 (+ 1) {\emph{value}} - * - The value to pass to \$sce.getTrusted. \newline % Row Count 27 (+ 2) Returns: \newline % Row Count 28 (+ 1) * - The return value of \seqsplit{\$sce.getTrusted(\$sce.JS}, value) \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{parseAsHtml(expression);}} - Shorthand method. \seqsplit{\$sce.parseAsHtml(expression} string) → \$sce.parseAs(\$sce.HTML, value) \newline % Row Count 3 (+ 3) Parameters: \newline % Row Count 4 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 6 (+ 2) Returns: \newline % Row Count 7 (+ 1) {\emph{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 9 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 12 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 15 (+ 3) {\bf{parseAsCss(expression);}} - Shorthand method. \$sce.parseAsCss(value) → \$sce.parseAs(\$sce.CSS, value) \newline % Row Count 18 (+ 3) Parameters: \newline % Row Count 19 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 21 (+ 2) Returns: \newline % Row Count 22 (+ 1) {\emph{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 24 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 27 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 30 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{parseAsUrl(expression);}} - Shorthand method. \$sce.parseAsUrl(value) → \$sce.parseAs(\$sce.URL, value) \newline % Row Count 3 (+ 3) Parameters: \newline % Row Count 4 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 6 (+ 2) Returns: \newline % Row Count 7 (+ 1) {\bf{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 9 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 12 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 15 (+ 3) {\bf{parseAsResourceUrl(expression);}} - Shorthand method. \seqsplit{\$sce.parseAsResourceUrl(value)} → \seqsplit{\$sce.parseAs(\$sce.RESOURCE\_URL}, value) \newline % Row Count 18 (+ 3) Parameters: \newline % Row Count 19 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 21 (+ 2) Returns: \newline % Row Count 22 (+ 1) {\bf{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 24 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 27 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context. \newline % Row Count 30 (+ 3) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sce (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{parseAsJs(expression);}} - Shorthand method. \$sce.parseAsJs(value) → \$sce.parseAs(\$sce.JS, value) \newline % Row Count 3 (+ 3) Parameters: \newline % Row Count 4 (+ 1) {\emph{expression}} - \{string\} - String expression to compile. \newline % Row Count 6 (+ 2) Returns: \newline % Row Count 7 (+ 1) {\emph{function(context, locals)}} - a function which represents the compiled expression: \newline % Row Count 9 (+ 2) {\emph{context}} – \{object\} – an object against which any expressions embedded in the strings are evaluated against (typically a scope object). \newline % Row Count 12 (+ 3) {\emph{locals}} – \{object=\} – local variables context object, useful for overriding values in context.% Row Count 15 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sceDelegate}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\$sceDelegate is a service that is used by the \$sce service to provide Strict Contextual Escaping (SCE) services to AngularJS. \newline % Row Count 3 (+ 3) Methods: \newline % Row Count 4 (+ 1) {\bf{trustAs(type, value);}} - Returns an object that is trusted by angular for use in specified strict contextual escaping contexts (such as ng-bind-html, ng-include, any src attribute interpolation, any dom event binding attribute interpolation such as for onclick, etc.) that uses the provided value. See \$sce for enabling strict contextual escaping. \newline % Row Count 12 (+ 8) Parameters: \newline % Row Count 13 (+ 1) {\emph{type}} - \{string\} - The kind of context in which this value is safe for use. e.g. url, resourceUrl, html, js and css. \newline % Row Count 16 (+ 3) {\emph{value}} - \{*\} - The value that that should be considered trusted/safe. \newline % Row Count 18 (+ 2) Returns: \newline % Row Count 19 (+ 1) {\emph{*}} - A value that can be used to stand in for the provided value in places where Angular expects a \$sce.trustAs() return value. \newline % Row Count 22 (+ 3) {\bf{valueOf(value);}} - If the passed parameter had been returned by a prior call to \$sceDelegate.trustAs, returns the value that had been passed to \$sceDelegate.trustAs. If the passed parameter is not a value that had been returned by \$sceDelegate.trustAs, returns it as-is. \newline % Row Count 28 (+ 6) Parameters: \newline % Row Count 29 (+ 1) {\emph{value}} - \{*\} - The result of a prior \$sceDelegate.trustAs call or anything else. \newline % Row Count 31 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{sceDelegate (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ Returns: \newline % Row Count 1 (+ 1) \{*\} - The value that was originally provided to \$sceDelegate.trustAs if value is the result of such a call. Otherwise, returns value unchanged. \newline % Row Count 4 (+ 3) {\bf{getTrusted(type, maybeTrusted);}} - Takes the result of a \$sceDelegate.trustAs call and returns the originally supplied value if the queried context type is a supertype of the created type. If this condition isn't satisfied, throws an exception. \newline % Row Count 9 (+ 5) Parameters: \newline % Row Count 10 (+ 1) {\emph{type}} - \{string\} - The kind of context in which this value is to be used. \newline % Row Count 12 (+ 2) {\bf{maybeTrusted}} - \{*\} - The result of a prior \$sceDelegate.trustAs call. \newline % Row Count 14 (+ 2) Returns: \newline % Row Count 15 (+ 1) {\emph{*}} - The value the was originally provided to \$sceDelegate.trustAs if valid in this context. Otherwise, throws an exception.% Row Count 18 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{filter (service)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Filters are used for formatting data displayed to the user. \newline % Row Count 2 (+ 2) Usage \newline % Row Count 3 (+ 1) \$filter(name); \newline % Row Count 4 (+ 1) {\bf{name}}, {\emph{String}}: Name of the filter function to retrieve \newline % Row Count 6 (+ 2) Returns \newline % Row Count 7 (+ 1) {\bf{Function}}: the filter function% Row Count 8 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{http}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The \$http service is a core Angular service that facilitates communication with the remote HTTP servers via the browser's XMLHttpRequest object or via JSONP. \newline % Row Count 4 (+ 4) Usage \newline % Row Count 5 (+ 1) \$http(config); \newline % Row Count 6 (+ 1) Arguments \newline % Row Count 7 (+ 1) {\bf{config}}, {\emph{object}}: Object describing the request to be made and how it should be processed. The object has following properties: \newline % Row Count 10 (+ 3) {\emph{method}} – \{string\} – HTTP method (e.g. 'GET', 'POST', etc) \newline % Row Count 12 (+ 2) {\emph{url}} – \{string\} – Absolute or relative URL of the resource that is being requested. \newline % Row Count 14 (+ 2) {\emph{params}} – \{Object.\textless{}string|Object\textgreater{}\} – Map of strings or objects which will be turned to \seqsplit{?key1=value1\&key2=value2} after the url. If the value is not a string, it will be JSONified. \newline % Row Count 18 (+ 4) {\emph{data}} – \{string|Object\} – Data to be sent as the request message data. \newline % Row Count 20 (+ 2) {\emph{headers}} – \{Object\} – Map of strings or functions which return strings representing HTTP headers to send to the server. If the return value of a function is null, the header will not be sent. \newline % Row Count 25 (+ 5) {\emph{xsrfHeaderName}} – \{string\} – Name of HTTP header to populate with the XSRF token. \newline % Row Count 27 (+ 2) {\emph{xsrfCookieName}} – \{string\} – Name of cookie containing the XSRF token. \newline % Row Count 29 (+ 2) {\emph{transformRequest}} – \{function(data, headersGetter)|Array.\textless{}function(data, headersGetter)\textgreater{}\} – transform function or an array of such functions. The transform function takes the http request body and headers and returns its transformed (typically serialized) version. \newline % Row Count 35 (+ 6) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{http (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ {\emph{transformResponse}} – \{function(data, headersGetter)|Array.\textless{}function(data, headersGetter)\textgreater{}\} – transform function or an array of such functions. The transform function takes the http response body and headers and returns its transformed (typically deserialized) version. \newline % Row Count 6 (+ 6) {\emph{cache}} – \{boolean|Cache\} – If true, a default \$http cache will be used to cache the GET request, otherwise if a cache instance built with \$cacheFactory, this cache will be used for caching. \newline % Row Count 10 (+ 4) {\emph{timeout}} – \{number|Promise\} – timeout in milliseconds, or promise that should abort the request when resolved. \newline % Row Count 13 (+ 3) {\emph{withCredentials}} - \{boolean\} - whether to set the withCredentials flag on the XHR object. See requests with credentials for more information. \newline % Row Count 16 (+ 3) {\emph{responseType}} - \{string\} - see requestType. \newline % Row Count 17 (+ 1) Returns \newline % Row Count 18 (+ 1) {\bf{HttpPromise}}: Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two arguments a success and an error callback which will be called with a response object. The success and error methods take a single argument - a function that will be called when the request succeeds or fails respectively. The arguments passed into these functions are destructured representation of the response object passed into the then method. The response object has these properties: \newline % Row Count 29 (+ 11) {\emph{data}} – \{string|Object\} – The response body transformed with the transform functions. \newline % Row Count 31 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{http (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ {\emph{status}} – \{number\} – HTTP status code of the response. \newline % Row Count 2 (+ 2) {\emph{headers}} – \{function({[}headerName{]})\} – Header getter function. \newline % Row Count 4 (+ 2) {\emph{config}} – \{Object\} – The configuration object that was used to generate the request. \newline % Row Count 6 (+ 2) {\emph{statusText}} – \{string\} – HTTP status text of the response. \newline % Row Count 8 (+ 2) Methods \newline % Row Count 9 (+ 1) {\bf{get(url, {[}config{]});}}: Shortcut method to perform GET request. \newline % Row Count 11 (+ 2) Parameters: \newline % Row Count 12 (+ 1) {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 14 (+ 2) {\emph{config}}(optional) — \{Object\} — Optional configuration object \newline % Row Count 16 (+ 2) Returns: \newline % Row Count 17 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 18 (+ 1) {\bf{delete(url, {[}config{]});}}: Shortcut method to perform DELETE request. \newline % Row Count 20 (+ 2) Parameters \newline % Row Count 21 (+ 1) {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 23 (+ 2) {\emph{config}} (optional) — \{Object\}: Optional configuration object \newline % Row Count 25 (+ 2) Returns \newline % Row Count 26 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 27 (+ 1) {\bf{head(url, {[}config{]});}} — Shortcut method to perform HEAD request. \newline % Row Count 29 (+ 2) Parameters \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{http (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 2 (+ 2) {\emph{config}} (optional) — \{Object\} — Optional configuration object \newline % Row Count 4 (+ 2) Returns \newline % Row Count 5 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 6 (+ 1) {\bf{jsonp(url, {[}config{]});}} — Shortcut method to perform JSONP request. \newline % Row Count 8 (+ 2) Parameters \newline % Row Count 9 (+ 1) {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request. The name of the callback should be the string JSON\_CALLBACK. \newline % Row Count 13 (+ 4) {\emph{config}} (optional) — \{Object\} — Optional configuration object \newline % Row Count 15 (+ 2) Returns \newline % Row Count 16 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 17 (+ 1) {\bf{post(url, data, {[}config{]});}} — Shortcut method to perform POST request. \newline % Row Count 19 (+ 2) Parameters \newline % Row Count 20 (+ 1) {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 22 (+ 2) {\emph{data}} — \{*\} — Request content \newline % Row Count 23 (+ 1) {\emph{config}} (optional) — \{Object\} — Optional configuration object \newline % Row Count 25 (+ 2) Returns \newline % Row Count 26 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 27 (+ 1) {\bf{put(url, data, {[}config{]});}} — Shortcut method to perform PUT request. \newline % Row Count 29 (+ 2) Parameters \newline % Row Count 30 (+ 1) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{http (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 2 (+ 2) {\emph{data}} — \{*\} — Request content \newline % Row Count 3 (+ 1) {\emph{config}} (optional) — \{Object\} — Optional configuration object \newline % Row Count 5 (+ 2) Returns \newline % Row Count 6 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 7 (+ 1) {\bf{patch(url, data, {[}config{]});}} — Shortcut method to perform PATCH request. \newline % Row Count 9 (+ 2) Parameters \newline % Row Count 10 (+ 1) {\emph{url}} — \{string\} — Relative or absolute URL specifying the destination of the request \newline % Row Count 12 (+ 2) {\emph{data}} — \{*\} — Request content \newline % Row Count 13 (+ 1) {\emph{config}} (optional) — \{Object\} — Optional configuration object \newline % Row Count 15 (+ 2) Returns \newline % Row Count 16 (+ 1) {\emph{HttpPromise}} — Future object \newline % Row Count 17 (+ 1) Properties \newline % Row Count 18 (+ 1) {\bf{pendingRequests}} \{Array.\textless{}Object\textgreater{}\} — Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes. \newline % Row Count 22 (+ 4) {\bf{defaults}} — Runtime equivalent of the \$httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations. \newline % Row Count 26 (+ 4) See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.% Row Count 28 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{httpBackend}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{HTTP backend used by the service (\$http) that delegates to XMLHttpRequest object or JSONP and deals with browser incompatibilities.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{q}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A promise/deferred implementation inspired by Kris Kowal's Q. \newline % Row Count 2 (+ 2) Usage: \newline % Row Count 3 (+ 1) \$q(resolver); \newline % Row Count 4 (+ 1) Arguments: \newline % Row Count 5 (+ 1) {\bf{resolver}} - \{function(function, function)\} - Function which is responsible for resolving or rejecting the newly created promise. The first parameter is a function which resolves the promise, the second parameter is a function which rejects the promise. \newline % Row Count 11 (+ 6) Returns: \newline % Row Count 12 (+ 1) {\emph{Promise}} - The newly created promise. \newline % Row Count 13 (+ 1) Methods: \newline % Row Count 14 (+ 1) {\bf{defer();}} - Creates a Deferred object which represents a task which will finish in the future. \newline % Row Count 16 (+ 2) Returns: \newline % Row Count 17 (+ 1) {\emph{Deferred}} - Returns a new instance of deferred. \newline % Row Count 18 (+ 1) {\bf{reject(reason);}} - Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it. When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject. \newline % Row Count 31 (+ 13) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{q (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Parameters: \newline % Row Count 1 (+ 1) {\bf{reason}} - \{*\} - Constant, message, exception or an object representing the rejection reason. \newline % Row Count 3 (+ 2) Returns: \newline % Row Count 4 (+ 1) {\emph{Promise}} - Returns a promise that was already resolved as rejected with the reason. \newline % Row Count 6 (+ 2) {\bf{when(value);}} - Wraps an object that might be a value or a (3rd party) then-able promise into a \$q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted. \newline % Row Count 12 (+ 6) Parameters: \newline % Row Count 13 (+ 1) {\emph{value}} - \{*\} - Value or a promise \newline % Row Count 14 (+ 1) Returns: \newline % Row Count 15 (+ 1) {\emph{Promise}} - Returns a promise of the passed value or promise \newline % Row Count 17 (+ 2) {\bf{all(promises);}} - Combines multiple promises into a single promise that is resolved when all of the input promises are resolved. \newline % Row Count 20 (+ 3) Parameters: \newline % Row Count 21 (+ 1) {\bf{promises}} - \{Array.\textless{}Promise\textgreater{}Object.\textless{}Promise\textgreater{}\} - An array or hash of promises. \newline % Row Count 23 (+ 2) Returns: \newline % Row Count 24 (+ 1) {\emph{Promise}} - Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.% Row Count 31 (+ 7) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{interval}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Angular's wrapper for window.setInterval. The fn function is executed every delay milliseconds. \newline % Row Count 2 (+ 2) {\bf{Usage}} \newline % Row Count 3 (+ 1) \$interval(fn, delay, {[}count{]}, {[}invokeApply{]}); \newline % Row Count 4 (+ 1) Arguments: \newline % Row Count 5 (+ 1) {\bf{fn}} - \{function()\} - A function that should be called repeatedly. \newline % Row Count 7 (+ 2) {\bf{delay}} - \{number\} - Number of milliseconds between each function call. \newline % Row Count 9 (+ 2) {\bf{count}} (optional) - \{number\} - Number of times to repeat. If not set, or 0, will repeat indefinitely. (default: 0) \newline % Row Count 12 (+ 3) {\bf{invokeApply}} (optional) - \{boolean\} - If set to false skips model dirty checking, otherwise will invoke fn within the \$apply block. (default: true) \newline % Row Count 16 (+ 4) Returns: \newline % Row Count 17 (+ 1) {\bf{promise}} - A promise which will be notified on each iteration. \newline % Row Count 19 (+ 2) Methods: \newline % Row Count 20 (+ 1) {\bf{cancel(promise);}} - Cancels a task associated with the promise. \newline % Row Count 22 (+ 2) Parameters: \newline % Row Count 23 (+ 1) {\emph{promise}} - \{promise\} - returned by the \$interval function. \newline % Row Count 25 (+ 2) Returns: \newline % Row Count 26 (+ 1) {\emph{boolean}} - Returns true if the task was successfully canceled.% Row Count 28 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{timeout}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Angular's wrapper for window.setTimeout. The fn function is wrapped into a try/catch block and delegates any exceptions to \$exceptionHandler service. \newline % Row Count 3 (+ 3) Usage: \newline % Row Count 4 (+ 1) {\bf{\$timeout(fn, {[}delay{]}, {[}invokeApply{]});}} \newline % Row Count 5 (+ 1) Arguments: \newline % Row Count 6 (+ 1) {\bf{fn}} - \{function()\} - A function, whose execution should be delayed. \newline % Row Count 8 (+ 2) {\bf{delay}}, (optional) - \{number\} - Delay in milliseconds.(default: 0) \newline % Row Count 10 (+ 2) {\bf{invokeApply}}, (optional) - \{boolean\} - If set to false skips model dirty checking, otherwise will invoke fn within the \$apply block. (default: true) \newline % Row Count 14 (+ 4) Returns: \newline % Row Count 15 (+ 1) {\bf{Promise}} - Promise that will be resolved when the timeout is reached. The value this promise will be resolved with is the return value of the fn function. \newline % Row Count 19 (+ 4) Methods: \newline % Row Count 20 (+ 1) {\bf{cancel({[}promise{]});}} - Cancels a task associated with the promise. As a result of this, the promise will be resolved with a rejection. \newline % Row Count 23 (+ 3) Parameters: \newline % Row Count 24 (+ 1) {\bf{promise}}, (optional) - \{Promise\} - Promise returned by the \$timeout function. \newline % Row Count 26 (+ 2) Returns: \newline % Row Count 27 (+ 1) {\bf{boolean}} - Returns true if the task hasn't executed yet and was successfully canceled.% Row Count 29 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{document}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A jQuery or jqLite wrapper for the browser's window.document object.% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{window}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A reference to the browser's window object. While window is globally available in JavaScript, it causes testability problems, because it is a global variable. In angular we always refer to it through the \$window service, so it may be overridden, removed or mocked for testing.% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{locale}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\$locale service provides localization rules for various Angular components. As of right now the only public api is: \newline % Row Count 3 (+ 3) {\bf{id}} – \{string\} – locale id formatted as languageId-countryId (e.g. en-us)% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{location}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The \$location service parses the URL in the browser address bar (based on the window.location) and makes the URL available to your application. Changes to the URL in the address bar are reflected into \$location service and changes to \$location are reflected into the browser address bar. \newline % Row Count 6 (+ 6) Methods: \newline % Row Count 7 (+ 1) {\bf{absUrl();}} - This method is getter only. Return full url representation with all segments encoded according to rules specified in RFC 3986. \newline % Row Count 10 (+ 3) Returns: \newline % Row Count 11 (+ 1) {\emph{string}} - full url \newline % Row Count 12 (+ 1) {\bf{url({[}url{]}, {[}replace{]});}} - This method is getter / setter. Return url (e.g. /path?a=b\#hash) when called without any parameter. Change path, search and hash, when called with parameter and return \$location. \newline % Row Count 17 (+ 5) Parameters: \newline % Row Count 18 (+ 1) {\emph{url}} (optional) - \{string\} - New url without base prefix (e.g. /path?a=b\#hash) \newline % Row Count 20 (+ 2) {\emph{replace}} (optional) - \{string\} - The path that will be changed \newline % Row Count 22 (+ 2) Returns: \newline % Row Count 23 (+ 1) \{string\} - url \newline % Row Count 24 (+ 1) {\bf{protocol();}} - This method is getter only. Return protocol of current url. \newline % Row Count 26 (+ 2) Returns: \newline % Row Count 27 (+ 1) {\emph{string}} - protocol of current url \newline % Row Count 28 (+ 1) {\bf{host();}} - This method is getter only. Return host of current url. \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{location (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Returns: \newline % Row Count 1 (+ 1) {\emph{string}} - host of current url. \newline % Row Count 2 (+ 1) {\bf{port();}} - This method is getter only. Return port of current url. \newline % Row Count 4 (+ 2) Returns: \newline % Row Count 5 (+ 1) {\emph{Number}} - port \newline % Row Count 6 (+ 1) {\bf{path({[}path{]});}} - This method is getter / setter. Return path of current url when called without any parameter. Change path when called with parameter and return \$location. Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing. \newline % Row Count 12 (+ 6) Parameters: \newline % Row Count 13 (+ 1) {\emph{path}} (optional) - \{string\} - New path \newline % Row Count 14 (+ 1) Returns: \newline % Row Count 15 (+ 1) \{string\} - path \newline % Row Count 16 (+ 1) {\bf{search(search, {[}paramValue{]});}} - This method is getter / setter. Return search part (as object) of current url when called without any parameter. Change search part when called with parameter and return \$location. \newline % Row Count 21 (+ 5) Parameters: \newline % Row Count 22 (+ 1) {\emph{search}} - \{stringObject.\textless{}string\textgreater{}Object.\textless{}Array.\textless{}string\textgreater{}\textgreater{} \} - New search params - string or hash object. \newline % Row Count 25 (+ 3) When called with a single argument the method acts as a setter, setting the search component of \$location to the specified value. If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url. \newline % Row Count 31 (+ 6) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{location (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\emph{paramValue}} (optional) - \{stringArray.\textless{}string\textgreater{}boolean\} If search is a string, then paramValue will override only a single search property. \newline % Row Count 3 (+ 3) If paramValue is an array, it will override the property of the search component of \$location specified via the first argument. \newline % Row Count 6 (+ 3) If paramValue is null, the property specified via the first argument will be deleted. \newline % Row Count 8 (+ 2) If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign. \newline % Row Count 11 (+ 3) Returns: \newline % Row Count 12 (+ 1) {\emph{Object}} - If called with no arguments returns the parsed search object. If called with one or more arguments returns \$location object itself. \newline % Row Count 15 (+ 3) {\bf{hash({[}hash{]});}} - This method is getter / setter. Return hash fragment when called without any parameter. Change hash fragment when called with parameter and return \$location. \newline % Row Count 19 (+ 4) Parameters: \newline % Row Count 20 (+ 1) {\emph{hash}} (optional) - \{string\} - New hash fragment \newline % Row Count 21 (+ 1) Returns: \newline % Row Count 22 (+ 1) {\emph{string}} - hash \newline % Row Count 23 (+ 1) {\bf{replace();}} - If called, all changes to \$location during current \$digest will be replacing current history record, instead of adding new one. \newline % Row Count 26 (+ 3) Events: \newline % Row Count 27 (+ 1) {\bf{\$locationChangeStart}} - Broadcasted before a URL will change. This change can be prevented by calling preventDefault method of the event. See \$rootScope.Scope for more details about event object. Upon successful change \$locationChangeSuccess is fired. \newline % Row Count 33 (+ 6) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{location (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Type: \newline % Row Count 1 (+ 1) {\emph{broadcast}} \newline % Row Count 2 (+ 1) Target: \newline % Row Count 3 (+ 1) {\emph{root scope}} \newline % Row Count 4 (+ 1) {\bf{\$locationChangeSuccess}} \newline % Row Count 5 (+ 1) Broadcasted after a URL was changed. \newline % Row Count 6 (+ 1) Type: \newline % Row Count 7 (+ 1) {\emph{broadcast}} \newline % Row Count 8 (+ 1) Target: \newline % Row Count 9 (+ 1) {\emph{root scope}}% Row Count 10 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{anchorScroll}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{When called, it checks current value of \$location.hash() and scrolls to the related element, according to rules specified in Html5 spec. \newline % Row Count 3 (+ 3) Usage \newline % Row Count 4 (+ 1) `\$anchorScroll();`% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{log}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Simple service for logging. Default implementation safely writes the message into the browser's console (if present). \newline % Row Count 3 (+ 3) Methods: \newline % Row Count 4 (+ 1) {\bf{log();}} - Write a log message \newline % Row Count 5 (+ 1) {\bf{info();}} - Write an information message \newline % Row Count 6 (+ 1) {\bf{warn();}} - Write a warning message \newline % Row Count 7 (+ 1) {\bf{error();}} - Write an error message \newline % Row Count 8 (+ 1) {\bf{debug();}} - Write a debug message% Row Count 9 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{rootElement}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The root element of Angular application. This is either the element where ngApp was declared or the element passed into angular.bootstrap. The element represent the root element of application. It is also the location where the applications \$injector service gets published, it can be retrieved using \seqsplit{\$rootElement.injector().}% Row Count 7 (+ 7) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{rootScope}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Every application has a single root scope. All other scopes are descendant scopes of the root scope. Scopes provide separation between the model and the view, via a mechanism for watching the model for changes. They also provide an event emission/broadcast and subscription facility.% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{templateCache}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The first time a template is used, it is loaded in the template cache for quick retrieval. You can load templates directly into the cache in a script tag, or by consuming the \$templateCache service directly. \newline % Row Count 5 (+ 5) Adding via the script tag: \newline % Row Count 6 (+ 1) \textless{}script type="text/ng-template" id="templateId.html"\textgreater{} \newline % Row Count 8 (+ 2) \textless{}p\textgreater{}This is the content of the template\textless{}/p\textgreater{} \newline % Row Count 9 (+ 1) \textless{}/script\textgreater{} \newline % Row Count 10 (+ 1) Adding via the \$templateCache service: \newline % Row Count 11 (+ 1) var myApp = angular.module('myApp', {[}{]}); \newline % Row Count 12 (+ 1) \seqsplit{myApp.run(function(\$templateCache)} \{ \newline % Row Count 13 (+ 1) \seqsplit{\$templateCache.put('templateId.html'}, 'This is the content of the template'); \newline % Row Count 15 (+ 2) \}); \newline % Row Count 16 (+ 1) To retrieve the template later, simply use it in your HTML: \newline % Row Count 18 (+ 2) \textless{}div ng-include=" 'templateId.html' "\textgreater{}\textless{}/div\textgreater{} \newline % Row Count 19 (+ 1) or get it via Javascript: \newline % Row Count 20 (+ 1) \seqsplit{\$templateCache.get('templateId.html')}% Row Count 21 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{templateRequest}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The \$templateRequest service downloads the provided template using \$http and, upon success, stores the contents inside of \$templateCache. If the HTTP request fails or the response data of the HTTP request is empty then a \$compile error will be thrown (the exception can be thwarted by setting the 2nd parameter of the function to true). \newline % Row Count 7 (+ 7) Usage: \newline % Row Count 8 (+ 1) \$templateRequest(tpl, {[}ignoreRequestError{]}); \newline % Row Count 9 (+ 1) Arguments: \newline % Row Count 10 (+ 1) {\bf{tpl}} - \{string\} - The HTTP request template URL \newline % Row Count 12 (+ 2) {\bf{ignoreRequestError}}, (optional) - \{boolean\} - Whether or not to ignore the exception when the request fails or the template is empty \newline % Row Count 15 (+ 3) Returns: \newline % Row Count 16 (+ 1) {\bf{Promise}} - the HTTP Promise for the given. \newline % Row Count 17 (+ 1) Properties: \newline % Row Count 18 (+ 1) {\bf{totalPendingRequests}} - \{number\} - total amount of pending template requests being downloaded.% Row Count 20 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}