5 lines
42 KiB
JSON
5 lines
42 KiB
JSON
{
|
|
"id": "api/common",
|
|
"title": "@angular/common",
|
|
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/common\", \"name\": \"@angular/common\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/PACKAGE.md?message=docs(...)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/PACKAGE.md\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n<header class=\"api-header\">\n <h1 id=\"angularcommon\">@angular/common<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#angularcommon\"><i class=\"material-icons\">link</i></a></h1>\n <label class=\"api-type-label package\">package</label>\n \n \n \n</header>\n\n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n <p>Implements fundamental Angular framework functionality, including directives and pipes, location services used in routing, HTTP services, localization support, and so on.</p>\n\n <p>The <code><a href=\"api/common/CommonModule\" class=\"code-anchor\">CommonModule</a></code> exports are re-exported by <code><a href=\"api/platform-browser/BrowserModule\" class=\"code-anchor\">BrowserModule</a></code>, which is included automatically in the root <code>AppModule</code> when you create a new app with the CLI <code>new</code> command.</p>\n\n\n \n\n\n \n <h2 id=\"entry-points\">Entry points<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#entry-points\"><i class=\"material-icons\">link</i></a></h2>\n \n \n \n <section class=\"export-list\">\n <h3 id=\"primary\">Primary<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#primary\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common#primary-entry-point-exports\">@angular/common</a></code></td>\n <td>\n \n <p>Implements fundamental Angular framework functionality, including directives and pipes, location services used in routing, HTTP services, localization support, and so on.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"secondary\">Secondary<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#secondary\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/http\">@angular/common/http</a></code></td>\n <td>\n \n <p>Implements an HTTP client API for Angular apps that relies on the <code>XMLHttpRequest</code> interface exposed by browsers.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/http/testing\">@angular/common/http/testing</a></code></td>\n <td>\n \n <p>Supplies a testing module for the Angular HTTP subsystem.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/testing\">@angular/common/testing</a></code></td>\n <td>\n \n <p>Supplies infrastructure for testing functionality supplied by <code>@angular/common</code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/upgrade\">@angular/common/upgrade</a></code></td>\n <td>\n \n <p>Provides tools for upgrading from the <code>$location</code> service provided in AngularJS\nto Angular's <a href=\"guide/upgrade#using-the-unified-angular-location-service\">unified location service</a>.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n\n <h2 id=\"primary-entry-point-exports\">Primary entry point exports<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#primary-entry-point-exports\"><i class=\"material-icons\">link</i></a></h2>\n \n \n \n \n \n <section class=\"export-list\">\n <h3 id=\"ngmodules\">NgModules<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#ngmodules\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/CommonModule\">CommonModule</a></code></td>\n <td>\n \n <p>Exports all the basic Angular directives and pipes,\nsuch as <code><a href=\"api/common/NgIf\" class=\"code-anchor\">NgIf</a></code>, <code><a href=\"api/common/NgForOf\" class=\"code-anchor\">NgForOf</a></code>, <code><a href=\"api/common/DecimalPipe\" class=\"code-anchor\">DecimalPipe</a></code>, and so on.\nRe-exported by <code><a href=\"api/platform-browser/BrowserModule\" class=\"code-anchor\">BrowserModule</a></code>, which is included automatically in the root\n<code>AppModule</code> when you create a new app with the CLI <code>new</code> command.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"classes\">Classes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#classes\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/HashLocationStrategy\">HashLocationStrategy</a></code></td>\n <td>\n \n <p>A <a href=\"api/common/LocationStrategy\"><code>LocationStrategy</code></a> used to configure the <a href=\"api/common/Location\"><code>Location</code></a> service to\nrepresent its state in the\n<a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax\">hash fragment</a>\nof the browser's URL.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/Location\">Location</a></code></td>\n <td>\n \n <p>A service that applications can use to interact with a browser's URL.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/LocationStrategy\">LocationStrategy</a></code></td>\n <td>\n \n <p>Enables the <code><a href=\"api/common/Location\" class=\"code-anchor\">Location</a></code> service to read route state from the browser's URL.\nAngular provides two strategies:\n<code><a href=\"api/common/HashLocationStrategy\" class=\"code-anchor\">HashLocationStrategy</a></code> and <code><a href=\"api/common/PathLocationStrategy\" class=\"code-anchor\">PathLocationStrategy</a></code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgForOfContext\">NgForOfContext</a></code></td>\n <td>\n \n \n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgIfContext\">NgIfContext</a></code></td>\n <td>\n \n \n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgLocaleLocalization\">NgLocaleLocalization</a></code></td>\n <td>\n \n <p>Returns the plural case based on the locale</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgLocalization\">NgLocalization</a></code></td>\n <td>\n \n \n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/PathLocationStrategy\">PathLocationStrategy</a></code></td>\n <td>\n \n <p>A <a href=\"api/common/LocationStrategy\"><code>LocationStrategy</code></a> used to configure the <a href=\"api/common/Location\"><code>Location</code></a> service to\nrepresent its state in the\n<a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax\">path</a> of the\nbrowser's URL.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/PlatformLocation\">PlatformLocation</a></code></td>\n <td>\n \n <p>This class should not be used directly by an application developer. Instead, use\n<a href=\"api/common/Location\"><code>Location</code></a>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/ViewportScroller\">ViewportScroller</a></code></td>\n <td>\n \n <p>Defines a scroll position manager. Implemented by <code>BrowserViewportScroller</code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/XhrFactory\">XhrFactory</a></code></td>\n <td>\n \n <p>A wrapper around the <code>XMLHttpRequest</code> constructor.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"functions\">Functions<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#functions\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/formatCurrency\">formatCurrency</a></code></td>\n <td>\n \n <p>Formats a number as currency using locale rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/formatDate\">formatDate</a></code></td>\n <td>\n \n <p>Formats a date according to locale rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/formatNumber\">formatNumber</a></code></td>\n <td>\n \n <p>Formats a number as text, with group sizing, separator, and other\nparameters based on the locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/formatPercent\">formatPercent</a></code></td>\n <td>\n \n <p>Formats a number as a percentage according to locale rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getCurrencySymbol\">getCurrencySymbol</a></code></td>\n <td>\n \n <p>Retrieves the currency symbol for a given currency code.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleCurrencyCode\">getLocaleCurrencyCode</a></code></td>\n <td>\n \n <p>Retrieves the default currency code for the given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleCurrencyName\">getLocaleCurrencyName</a></code></td>\n <td>\n \n <p>Retrieves the name of the currency for the main country corresponding\nto a given locale. For example, 'US Dollar' for <code>en-US</code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleCurrencySymbol\">getLocaleCurrencySymbol</a></code></td>\n <td>\n \n <p>Retrieves the symbol used to represent the currency for the main country\ncorresponding to a given locale. For example, '$' for <code>en-US</code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleDateFormat\">getLocaleDateFormat</a></code></td>\n <td>\n \n <p>Retrieves a localized date-value formating string.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleDateTimeFormat\">getLocaleDateTimeFormat</a></code></td>\n <td>\n \n <p>Retrieves a localized date-time formatting string.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleDayNames\">getLocaleDayNames</a></code></td>\n <td>\n \n <p>Retrieves days of the week for the given locale, using the Gregorian calendar.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleDayPeriods\">getLocaleDayPeriods</a></code></td>\n <td>\n \n <p>Retrieves day period strings for the given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleDirection\">getLocaleDirection</a></code></td>\n <td>\n \n <p>Retrieves the writing direction of a specified locale</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleEraNames\">getLocaleEraNames</a></code></td>\n <td>\n \n <p>Retrieves Gregorian-calendar eras for the given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleExtraDayPeriodRules\">getLocaleExtraDayPeriodRules</a></code></td>\n <td>\n \n <p>Retrieves locale-specific rules used to determine which day period to use\nwhen more than one period is defined for a locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleExtraDayPeriods\">getLocaleExtraDayPeriods</a></code></td>\n <td>\n \n <p>Retrieves locale-specific day periods, which indicate roughly how a day is broken up\nin different languages.\nFor example, for <code>en-US</code>, periods are morning, noon, afternoon, evening, and midnight.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleFirstDayOfWeek\">getLocaleFirstDayOfWeek</a></code></td>\n <td>\n \n <p>Retrieves the first day of the week for the given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleId\">getLocaleId</a></code></td>\n <td>\n \n <p>Retrieves the locale ID from the currently loaded locale.\nThe loaded locale could be, for example, a global one rather than a regional one.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleMonthNames\">getLocaleMonthNames</a></code></td>\n <td>\n \n <p>Retrieves months of the year for the given locale, using the Gregorian calendar.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleNumberFormat\">getLocaleNumberFormat</a></code></td>\n <td>\n \n <p>Retrieves a number format for a given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleNumberSymbol\">getLocaleNumberSymbol</a></code></td>\n <td>\n \n <p>Retrieves a localized number symbol that can be used to replace placeholders in number formats.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocalePluralCase\">getLocalePluralCase</a></code></td>\n <td>\n \n <p>Retrieves the plural function used by ICU expressions to determine the plural case to use\nfor a given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleTimeFormat\">getLocaleTimeFormat</a></code></td>\n <td>\n \n <p>Retrieves a localized time-value formatting string.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getLocaleWeekEndRange\">getLocaleWeekEndRange</a></code></td>\n <td>\n \n <p>Range of week days that are considered the week-end for the given locale.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/getNumberOfCurrencyDigits\">getNumberOfCurrencyDigits</a></code></td>\n <td>\n \n <p>Reports the number of decimal digits for a given currency.\nThe value depends upon the presence of cents in that particular currency.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/isPlatformBrowser\">isPlatformBrowser</a></code></td>\n <td>\n \n <p>Returns whether a platform id represents a browser platform.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/isPlatformServer\">isPlatformServer</a></code></td>\n <td>\n \n <p>Returns whether a platform id represents a server platform.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/isPlatformWorkerApp\">isPlatformWorkerApp</a></code></td>\n <td>\n \n <p>Returns whether a platform id represents a web worker app platform.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/isPlatformWorkerUi\">isPlatformWorkerUi</a></code></td>\n <td>\n \n <p>Returns whether a platform id represents a web worker UI platform.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/registerLocaleData\">registerLocaleData</a></code></td>\n <td>\n \n <p>Register global data to be used internally by Angular. See the\n<a href=\"guide/i18n#i18n-pipes\">\"I18n guide\"</a> to know how to import additional locale data.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"structures\">Structures<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#structures\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/FormStyle\">FormStyle</a></code></td>\n <td>\n \n <p>Context-dependant translation forms for strings.\nTypically the standalone version is for the nominative form of the word,\nand the format version is used for the genitive case.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/FormatWidth\">FormatWidth</a></code></td>\n <td>\n \n <p>String widths available for date-time formats.\nThe specific character widths are locale-specific.\nExamples are given for <code>en-US</code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/KeyValue\">KeyValue</a></code></td>\n <td>\n \n <p>A key value pair.\nUsually used to represent the key value pairs from a Map or Object.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/LocationChangeEvent\">LocationChangeEvent</a></code></td>\n <td>\n \n <p>A serializable version of the event from <code>onPopState</code> or <code>onHashChange</code></p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/LocationChangeListener\">LocationChangeListener</a></code></td>\n <td>\n \n \n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NumberFormatStyle\">NumberFormatStyle</a></code></td>\n <td>\n \n <p>Format styles that can be used to represent numbers.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NumberSymbol\">NumberSymbol</a></code></td>\n <td>\n \n <p>Symbols that can be used to replace placeholders in number patterns.\nExamples are based on <code>en-US</code> values.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/Plural\">Plural</a></code></td>\n <td>\n \n <p>Plurality cases used for translating plurals to different languages.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/PopStateEvent\">PopStateEvent</a></code></td>\n <td>\n \n \n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/TranslationWidth\">TranslationWidth</a></code></td>\n <td>\n \n <p>String widths available for translations.\nThe specific character widths are locale-specific.\nExamples are given for the word \"Sunday\" in English.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/WeekDay\">WeekDay</a></code></td>\n <td>\n \n <p>The value for each day of the week, based on the <code>en-US</code> locale</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"directives\">Directives<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#directives\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgClass\">NgClass</a></code></td>\n <td>\n \n <p>Adds and removes CSS classes on an HTML element.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgComponentOutlet\">NgComponentOutlet</a></code></td>\n <td>\n \n <p>Instantiates a single <a href=\"api/core/Component\"><code>Component</code></a> type and inserts its Host View into current View.\n<code><a href=\"api/common/NgComponentOutlet\" class=\"code-anchor\">NgComponentOutlet</a></code> provides a declarative approach for dynamic component creation.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgForOf\">NgForOf</a></code></td>\n <td>\n \n <p>A <a href=\"guide/structural-directives\">structural directive</a> that renders\na template for each item in a collection.\nThe directive is placed on an element, which becomes the parent\nof the cloned templates.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgIf\">NgIf</a></code></td>\n <td>\n \n <p>A structural directive that conditionally includes a template based on the value of\nan expression coerced to Boolean.\nWhen the expression evaluates to true, Angular renders the template\nprovided in a <code>then</code> clause, and when false or null,\nAngular renders the template provided in an optional <code>else</code> clause. The default\ntemplate for the <code>else</code> clause is blank.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgPlural\">NgPlural</a></code></td>\n <td>\n \n <p>Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgPluralCase\">NgPluralCase</a></code></td>\n <td>\n \n <p>Creates a view that will be added/removed from the parent <a href=\"api/common/NgPlural\"><code>NgPlural</code></a> when the\ngiven expression matches the plural expression according to CLDR rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgStyle\">NgStyle</a></code></td>\n <td>\n \n <p>An attribute directive that updates styles for the containing HTML element.\nSets one or more style properties, specified as colon-separated key-value pairs.\nThe key is a style name, with an optional <code>.<unit></code> suffix\n(such as 'top.px', 'font-style.em').\nThe value is an expression to be evaluated.\nThe resulting non-null value, expressed in the given unit,\nis assigned to the given style property.\nIf the result of evaluation is null, the corresponding style is removed.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgSwitch\">NgSwitch</a></code></td>\n <td>\n \n <p>The <code>[<a href=\"api/common/NgSwitch\" class=\"code-anchor\">ngSwitch</a>]</code> directive on a container specifies an expression to match against.\nThe expressions to match are provided by <code><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">ngSwitchCase</a></code> directives on views within the container.</p>\n<ul>\n<li>Every view that matches is rendered.</li>\n<li>If there are no matches, a view with the <code><a href=\"api/common/NgSwitchDefault\" class=\"code-anchor\">ngSwitchDefault</a></code> directive is rendered.</li>\n<li>Elements within the <code>[<a href=\"api/common/NgSwitch\" class=\"code-anchor\">NgSwitch</a>]</code> statement but outside of any <code><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">NgSwitchCase</a></code>\nor <code><a href=\"api/common/NgSwitchDefault\" class=\"code-anchor\">ngSwitchDefault</a></code> directive are preserved at the location.</li>\n</ul>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgSwitchCase\">NgSwitchCase</a></code></td>\n <td>\n \n <p>Provides a switch case expression to match against an enclosing <code><a href=\"api/common/NgSwitch\" class=\"code-anchor\">ngSwitch</a></code> expression.\nWhen the expressions match, the given <code><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">NgSwitchCase</a></code> template is rendered.\nIf multiple match expressions match the switch expression value, all of them are displayed.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgSwitchDefault\">NgSwitchDefault</a></code></td>\n <td>\n \n <p>Creates a view that is rendered when no <code><a href=\"api/common/NgSwitchCase\" class=\"code-anchor\">NgSwitchCase</a></code> expressions\nmatch the <code><a href=\"api/common/NgSwitch\" class=\"code-anchor\">NgSwitch</a></code> expression.\nThis statement should be the final case in an <code><a href=\"api/common/NgSwitch\" class=\"code-anchor\">NgSwitch</a></code>.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/NgTemplateOutlet\">NgTemplateOutlet</a></code></td>\n <td>\n \n <p>Inserts an embedded view from a prepared <code><a href=\"api/core/TemplateRef\" class=\"code-anchor\">TemplateRef</a></code>.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"pipes\">Pipes<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#pipes\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/AsyncPipe\">AsyncPipe</a></code></td>\n <td>\n \n <p>Unwraps a value from an asynchronous primitive.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/CurrencyPipe\">CurrencyPipe</a></code></td>\n <td>\n \n <p>Transforms a number to a currency string, formatted according to locale rules\nthat determine group sizing and separator, decimal-point character,\nand other locale-specific configurations.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/DatePipe\">DatePipe</a></code></td>\n <td>\n \n <p>Formats a date value according to locale rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/DecimalPipe\">DecimalPipe</a></code></td>\n <td>\n \n <p>Formats a value according to digit options and locale rules.\nLocale determines group sizing and separator,\ndecimal point character, and other locale-specific configurations.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/I18nPluralPipe\">I18nPluralPipe</a></code></td>\n <td>\n \n <p>Maps a value to a string that pluralizes the value according to locale rules.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/I18nSelectPipe\">I18nSelectPipe</a></code></td>\n <td>\n \n <p>Generic selector that displays the string that matches the current value.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/JsonPipe\">JsonPipe</a></code></td>\n <td>\n \n <p>Converts a value into its JSON-format representation. Useful for debugging.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/KeyValuePipe\">KeyValuePipe</a></code></td>\n <td>\n \n <p>Transforms Object or Map into an array of key value pairs.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/LowerCasePipe\">LowerCasePipe</a></code></td>\n <td>\n \n <p>Transforms text to all lower case.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/PercentPipe\">PercentPipe</a></code></td>\n <td>\n \n <p>Transforms a number to a percentage\nstring, formatted according to locale rules that determine group sizing and\nseparator, decimal-point character, and other locale-specific\nconfigurations.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/SlicePipe\">SlicePipe</a></code></td>\n <td>\n \n <p>Creates a new <code>Array</code> or <code>String</code> containing a subset (slice) of the elements.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/TitleCasePipe\">TitleCasePipe</a></code></td>\n <td>\n \n <p>Transforms text to title case.\nCapitalizes the first letter of each word and transforms the\nrest of the word to lower case.\nWords are delimited by any whitespace character, such as a space, tab, or line-feed character.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/UpperCasePipe\">UpperCasePipe</a></code></td>\n <td>\n \n <p>Transforms text to all upper case.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n \n \n \n <section class=\"export-list\">\n <h3 id=\"types\">Types<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common#types\"><i class=\"material-icons\">link</i></a></h3>\n <table class=\"is-full-width list-table\">\n \n <tbody><tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/APP_BASE_HREF\">APP_BASE_HREF</a></code></td>\n <td>\n \n <p>A predefined <a href=\"guide/glossary#di-token\">DI token</a> for the base href\nto be used with the <code><a href=\"api/common/PathLocationStrategy\" class=\"code-anchor\">PathLocationStrategy</a></code>.\nThe base href is the URL prefix that should be preserved when generating\nand recognizing URLs.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/DOCUMENT\">DOCUMENT</a></code></td>\n <td>\n \n <p>A DI Token representing the main rendering context. In a browser this is the DOM Document.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/LOCATION_INITIALIZED\">LOCATION_INITIALIZED</a></code></td>\n <td>\n \n <p>Indicates when a location is initialized.</p>\n\n </td>\n </tr>\n \n <tr>\n <td><code class=\"code-anchor\"><a href=\"api/common/Time\">Time</a></code></td>\n <td>\n \n <p>Represents a time value with hours and minutes.</p>\n\n </td>\n </tr>\n \n </tbody></table>\n </section>\n \n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common/APP_BASE_HREF\n - api/common/AsyncPipe\n - api/common/CommonModule\n - api/common/CurrencyPipe\n - api/common/DOCUMENT\n - api/common/DatePipe\n - api/common/DecimalPipe\n - api/common/FormStyle\n - api/common/FormatWidth\n - api/common/HashLocationStrategy\n - api/common/I18nPluralPipe\n - api/common/I18nSelectPipe\n - api/common/JsonPipe\n - api/common/KeyValue\n - api/common/KeyValuePipe\n - api/common/LOCATION_INITIALIZED\n - api/common/Location\n - api/common/LocationChangeEvent\n - api/common/LocationChangeListener\n - api/common/LocationStrategy\n - api/common/LowerCasePipe\n - api/common/NgClass\n - api/common/NgComponentOutlet\n - api/common/NgForOf\n - api/common/NgForOfContext\n - api/common/NgIf\n - api/common/NgIfContext\n - api/common/NgLocaleLocalization\n - api/common/NgLocalization\n - api/common/NgPlural\n - api/common/NgPluralCase\n - api/common/NgStyle\n - api/common/NgSwitch\n - api/common/NgSwitchCase\n - api/common/NgSwitchDefault\n - api/common/NgTemplateOutlet\n - api/common/NumberFormatStyle\n - api/common/NumberSymbol\n - api/common/PathLocationStrategy\n - api/common/PercentPipe\n - api/common/PlatformLocation\n - api/common/Plural\n - api/common/PopStateEvent\n - api/common/SlicePipe\n - api/common/Time\n - api/common/TitleCasePipe\n - api/common/TranslationWidth\n - api/common/UpperCasePipe\n - api/common/ViewportScroller\n - api/common/WeekDay\n - api/common/XhrFactory\n - api/common/formatCurrency\n - api/common/formatDate\n - api/common/formatNumber\n - api/common/formatPercent\n - api/common/getCurrencySymbol\n - api/common/getLocaleCurrencyCode\n - api/common/getLocaleCurrencyName\n - api/common/getLocaleCurrencySymbol\n - api/common/getLocaleDateFormat\n - api/common/getLocaleDateTimeFormat\n - api/common/getLocaleDayNames\n - api/common/getLocaleDayPeriods\n - api/common/getLocaleDirection\n - api/common/getLocaleEraNames\n - api/common/getLocaleExtraDayPeriodRules\n - api/common/getLocaleExtraDayPeriods\n - api/common/getLocaleFirstDayOfWeek\n - api/common/getLocaleId\n - api/common/getLocaleMonthNames\n - api/common/getLocaleNumberFormat\n - api/common/getLocaleNumberSymbol\n - api/common/getLocalePluralCase\n - api/common/getLocaleTimeFormat\n - api/common/getLocaleWeekEndRange\n - api/common/getNumberOfCurrencyDigits\n - api/common/http\n - api/common/http/HTTP_INTERCEPTORS\n - api/common/http/HttpBackend\n - api/common/http/HttpClient\n - api/common/http/HttpClientJsonpModule\n - api/common/http/HttpClientModule\n - api/common/http/HttpClientXsrfModule\n - api/common/http/HttpContext\n - api/common/http/HttpContextToken\n - api/common/http/HttpDownloadProgressEvent\n - api/common/http/HttpErrorResponse\n - api/common/http/HttpEvent\n - api/common/http/HttpEventType\n - api/common/http/HttpHandler\n - api/common/http/HttpHeaderResponse\n - api/common/http/HttpHeaders\n - api/common/http/HttpInterceptor\n - api/common/http/HttpParameterCodec\n - api/common/http/HttpParams\n - api/common/http/HttpParamsOptions\n - api/common/http/HttpProgressEvent\n - api/common/http/HttpRequest\n - api/common/http/HttpResponse\n - api/common/http/HttpResponseBase\n - api/common/http/HttpSentEvent\n - api/common/http/HttpStatusCode\n - api/common/http/HttpUploadProgressEvent\n - api/common/http/HttpUrlEncodingCodec\n - api/common/http/HttpUserEvent\n - api/common/http/HttpXhrBackend\n - api/common/http/HttpXsrfTokenExtractor\n - api/common/http/JsonpClientBackend\n - api/common/http/JsonpInterceptor\n - api/common/http/XhrFactory\n - api/common/http/testing\n - api/common/http/testing/HttpClientTestingModule\n - api/common/http/testing/HttpTestingController\n - api/common/http/testing/RequestMatch\n - api/common/http/testing/TestRequest\n - api/common/isPlatformBrowser\n - api/common/isPlatformServer\n - api/common/isPlatformWorkerApp\n - api/common/isPlatformWorkerUi\n - api/common/registerLocaleData\n - api/common/testing\n - api/common/testing/MOCK_PLATFORM_LOCATION_CONFIG\n - api/common/testing/MockLocationStrategy\n - api/common/testing/MockPlatformLocation\n - api/common/testing/MockPlatformLocationConfig\n - api/common/testing/SpyLocation\n - api/common/upgrade\n - api/common/upgrade/$locationShim\n - api/common/upgrade/$locationShimProvider\n - api/common/upgrade/AngularJSUrlCodec\n - api/common/upgrade/LOCATION_UPGRADE_CONFIGURATION\n - api/common/upgrade/LocationUpgradeConfig\n - api/common/upgrade/LocationUpgradeModule\n - api/common/upgrade/UrlCodec\n - guide/npm-packages\n-->\n<!-- links from this doc:\n - /api\n - api/common#angularcommon\n - api/common#classes\n - api/common#directives\n - api/common#entry-points\n - api/common#functions\n - api/common#ngmodules\n - api/common#pipes\n - api/common#primary\n - api/common#primary-entry-point-exports\n - api/common#secondary\n - api/common#structures\n - api/common#types\n - api/common/APP_BASE_HREF\n - api/common/AsyncPipe\n - api/common/CommonModule\n - api/common/CurrencyPipe\n - api/common/DOCUMENT\n - api/common/DatePipe\n - api/common/DecimalPipe\n - api/common/FormStyle\n - api/common/FormatWidth\n - api/common/HashLocationStrategy\n - api/common/I18nPluralPipe\n - api/common/I18nSelectPipe\n - api/common/JsonPipe\n - api/common/KeyValue\n - api/common/KeyValuePipe\n - api/common/LOCATION_INITIALIZED\n - api/common/Location\n - api/common/LocationChangeEvent\n - api/common/LocationChangeListener\n - api/common/LocationStrategy\n - api/common/LowerCasePipe\n - api/common/NgClass\n - api/common/NgComponentOutlet\n - api/common/NgForOf\n - api/common/NgForOfContext\n - api/common/NgIf\n - api/common/NgIfContext\n - api/common/NgLocaleLocalization\n - api/common/NgLocalization\n - api/common/NgPlural\n - api/common/NgPluralCase\n - api/common/NgStyle\n - api/common/NgSwitch\n - api/common/NgSwitchCase\n - api/common/NgSwitchDefault\n - api/common/NgTemplateOutlet\n - api/common/NumberFormatStyle\n - api/common/NumberSymbol\n - api/common/PathLocationStrategy\n - api/common/PercentPipe\n - api/common/PlatformLocation\n - api/common/Plural\n - api/common/PopStateEvent\n - api/common/SlicePipe\n - api/common/Time\n - api/common/TitleCasePipe\n - api/common/TranslationWidth\n - api/common/UpperCasePipe\n - api/common/ViewportScroller\n - api/common/WeekDay\n - api/common/XhrFactory\n - api/common/formatCurrency\n - api/common/formatDate\n - api/common/formatNumber\n - api/common/formatPercent\n - api/common/getCurrencySymbol\n - api/common/getLocaleCurrencyCode\n - api/common/getLocaleCurrencyName\n - api/common/getLocaleCurrencySymbol\n - api/common/getLocaleDateFormat\n - api/common/getLocaleDateTimeFormat\n - api/common/getLocaleDayNames\n - api/common/getLocaleDayPeriods\n - api/common/getLocaleDirection\n - api/common/getLocaleEraNames\n - api/common/getLocaleExtraDayPeriodRules\n - api/common/getLocaleExtraDayPeriods\n - api/common/getLocaleFirstDayOfWeek\n - api/common/getLocaleId\n - api/common/getLocaleMonthNames\n - api/common/getLocaleNumberFormat\n - api/common/getLocaleNumberSymbol\n - api/common/getLocalePluralCase\n - api/common/getLocaleTimeFormat\n - api/common/getLocaleWeekEndRange\n - api/common/getNumberOfCurrencyDigits\n - api/common/http\n - api/common/http/testing\n - api/common/isPlatformBrowser\n - api/common/isPlatformServer\n - api/common/isPlatformWorkerApp\n - api/common/isPlatformWorkerUi\n - api/common/registerLocaleData\n - api/common/testing\n - api/common/upgrade\n - api/core/Component\n - api/core/TemplateRef\n - api/platform-browser/BrowserModule\n - guide/glossary#di-token\n - guide/i18n#i18n-pipes\n - guide/structural-directives\n - guide/upgrade#using-the-unified-angular-location-service\n - https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax\n - https://github.com/angular/angular/edit/master/packages/common/PACKAGE.md?message=docs(...)%3A%20describe%20your%20change...\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/PACKAGE.md\n-->"
|
|
} |