carbon-components-angular
Version:
Next generation components
522 lines (457 loc) • 22.5 kB
HTML
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>carbon-components-angular documentation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../styles/style.css">
<link rel="stylesheet" href="../styles/dark.css">
<style>
footer.carbon {
position: absolute;
bottom: 0;
width: 100%;
z-index: 9999;
}
#root > div {
/*
* Subtracting the height of the footer to prevent
* overlaying the footer ontop of content
*/
height: calc(100vh - 48px);
}
</style>
</head>
<body>
<script>
// Blocking script to avoid flickering dark mode
// Dark mode toggle button
var useDark = window.matchMedia('(prefers-color-scheme: dark)');
var darkModeState = useDark.matches;
var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
function checkToggle(check) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].checked = check;
}
}
function toggleDarkMode(state) {
if (window.localStorage) {
localStorage.setItem('compodoc_darkmode-state', state);
}
checkToggle(state);
const hasClass = document.body.classList.contains('dark');
if (state) {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.add('dark');
}
if (!hasClass) {
document.body.classList.add('dark');
}
} else {
for (var i = 0; i < $darkModeToggles.length; i++) {
$darkModeToggles[i].classList.remove('dark');
}
if (hasClass) {
document.body.classList.remove('dark');
}
}
}
useDark.addEventListener('change', function (evt) {
toggleDarkMode(evt.matches);
});
if (darkModeStateLocal) {
darkModeState = darkModeStateLocal === 'true';
}
toggleDarkMode(darkModeState);
</script>
<div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
<div class="d-flex">
<a href="../" class="navbar-brand">carbon-components-angular documentation</a>
<button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
</div>
</div>
<div class="xs-menu menu" id="mobile-menu">
<div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
</div>
<div class="container-fluid main">
<div class="row main">
<div class="d-none d-md-block menu">
<compodoc-menu mode="normal"></compodoc-menu>
</div>
<!-- START CONTENT -->
<div class="content module">
<div class="content-data">
<ol class="breadcrumb">
<li class="breadcrumb-item">Modules</li>
<li class="breadcrumb-item" >NFormsModule</li>
</ol>
<div class="text-center module-graph-container">
<div id="module-graph-svg">
<!-- Generated by graphviz version 2.47.0 (20210316.0004)
-->
<!-- Title: dependencies Pages: 1 -->
<svg width="641pt" height="284pt"
viewBox="0.00 0.00 641.00 284.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 280)">
<title>dependencies</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-280 637,-280 637,4 -4,4"/>
<text text-anchor="start" x="295.51" y="-42.4" font-family="Times-12" font-weight="bold" font-size="14.00">Legend</text>
<polygon fill="#ffffb3" stroke="transparent" points="82.5,-10 82.5,-30 102.5,-30 102.5,-10 82.5,-10"/>
<text text-anchor="start" x="106.13" y="-15.4" font-family="Times-12" font-size="14.00">  Declarations</text>
<polygon fill="#8dd3c7" stroke="transparent" points="195.5,-10 195.5,-30 215.5,-30 215.5,-10 195.5,-10"/>
<text text-anchor="start" x="219.23" y="-15.4" font-family="Times-12" font-size="14.00">  Module</text>
<polygon fill="#80b1d3" stroke="transparent" points="281.5,-10 281.5,-30 301.5,-30 301.5,-10 281.5,-10"/>
<text text-anchor="start" x="305.28" y="-15.4" font-family="Times-12" font-size="14.00">  Bootstrap</text>
<polygon fill="#fdb462" stroke="transparent" points="378.5,-10 378.5,-30 398.5,-30 398.5,-10 378.5,-10"/>
<text text-anchor="start" x="402.17" y="-15.4" font-family="Times-12" font-size="14.00">  Providers</text>
<polygon fill="#fb8072" stroke="transparent" points="474.5,-10 474.5,-30 494.5,-30 494.5,-10 474.5,-10"/>
<text text-anchor="start" x="498.23" y="-15.4" font-family="Times-12" font-size="14.00">  Exports</text>
<g id="clust1" class="cluster">
<title>cluster_NFormsModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 625,-268 625,-70 8,-70"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_NFormsModule_exports</title>
<polygon fill="none" stroke="black" points="16,-208 16,-260 617,-260 617,-208 16,-208"/>
</g>
<g id="clust3" class="cluster">
<title>cluster_NFormsModule_imports</title>
<polygon fill="none" stroke="black" points="25,-78 25,-130 609,-130 609,-78 25,-78"/>
</g>
<!-- ButtonModule -->
<g id="node1" class="node">
<title>ButtonModule</title>
<polygon fill="#8dd3c7" stroke="black" points="600.67,-122 597.67,-126 576.67,-126 573.67,-122 503.33,-122 503.33,-86 600.67,-86 600.67,-122"/>
<text text-anchor="middle" x="552" y="-99.8" font-family="Times,serif" font-size="14.00">ButtonModule</text>
</g>
<!-- NFormsModule -->
<g id="node6" class="node">
<title>NFormsModule</title>
<polygon fill="#8dd3c7" stroke="black" points="358.94,-187 355.94,-191 334.94,-191 331.94,-187 253.06,-187 253.06,-151 358.94,-151 358.94,-187"/>
<text text-anchor="middle" x="306" y="-164.8" font-family="Times,serif" font-size="14.00">NFormsModule</text>
</g>
<!-- ButtonModule->NFormsModule -->
<g id="edge1" class="edge">
<title>ButtonModule->NFormsModule</title>
<path fill="none" stroke="black" d="M569.69,-122.03C569.69,-138.4 569.69,-160 569.69,-160 569.69,-160 368.73,-160 368.73,-160"/>
<polygon fill="black" stroke="black" points="368.73,-156.5 358.73,-160 368.73,-163.5 368.73,-156.5"/>
</g>
<!-- CheckboxModule -->
<g id="node2" class="node">
<title>CheckboxModule</title>
<polygon fill="#8dd3c7" stroke="black" points="485.32,-122 482.32,-126 461.32,-126 458.32,-122 368.68,-122 368.68,-86 485.32,-86 485.32,-122"/>
<text text-anchor="middle" x="427" y="-99.8" font-family="Times,serif" font-size="14.00">CheckboxModule</text>
</g>
<!-- CheckboxModule->NFormsModule -->
<g id="edge2" class="edge">
<title>CheckboxModule->NFormsModule</title>
<path fill="none" stroke="black" d="M368.59,-104C360.36,-104 354.63,-104 354.63,-104 354.63,-104 354.63,-140.89 354.63,-140.89"/>
<polygon fill="black" stroke="black" points="351.13,-140.89 354.63,-150.89 358.13,-140.89 351.13,-140.89"/>
</g>
<!-- InputModule -->
<g id="node3" class="node">
<title>InputModule</title>
<polygon fill="#8dd3c7" stroke="black" points="350.6,-122 347.6,-126 326.6,-126 323.6,-122 261.4,-122 261.4,-86 350.6,-86 350.6,-122"/>
<text text-anchor="middle" x="306" y="-99.8" font-family="Times,serif" font-size="14.00">InputModule</text>
</g>
<!-- InputModule->NFormsModule -->
<g id="edge3" class="edge">
<title>InputModule->NFormsModule</title>
<path fill="none" stroke="black" d="M306,-122.11C306,-122.11 306,-140.99 306,-140.99"/>
<polygon fill="black" stroke="black" points="302.5,-140.99 306,-150.99 309.5,-140.99 302.5,-140.99"/>
</g>
<!-- RadioModule -->
<g id="node4" class="node">
<title>RadioModule</title>
<polygon fill="#8dd3c7" stroke="black" points="243.49,-122 240.49,-126 219.49,-126 216.49,-122 150.51,-122 150.51,-86 243.49,-86 243.49,-122"/>
<text text-anchor="middle" x="197" y="-99.8" font-family="Times,serif" font-size="14.00">RadioModule</text>
</g>
<!-- RadioModule->NFormsModule -->
<g id="edge4" class="edge">
<title>RadioModule->NFormsModule</title>
<path fill="none" stroke="black" d="M243.67,-104C251.62,-104 257.37,-104 257.37,-104 257.37,-104 257.37,-140.89 257.37,-140.89"/>
<polygon fill="black" stroke="black" points="253.87,-140.89 257.37,-150.89 260.87,-140.89 253.87,-140.89"/>
</g>
<!-- ToggleModule -->
<g id="node5" class="node">
<title>ToggleModule</title>
<polygon fill="#8dd3c7" stroke="black" points="132.71,-122 129.71,-126 108.71,-126 105.71,-122 33.29,-122 33.29,-86 132.71,-86 132.71,-122"/>
<text text-anchor="middle" x="83" y="-99.8" font-family="Times,serif" font-size="14.00">ToggleModule</text>
</g>
<!-- ToggleModule->NFormsModule -->
<g id="edge5" class="edge">
<title>ToggleModule->NFormsModule</title>
<path fill="none" stroke="black" d="M95.37,-122.03C95.37,-138.4 95.37,-160 95.37,-160 95.37,-160 243.12,-160 243.12,-160"/>
<polygon fill="black" stroke="black" points="243.12,-163.5 253.12,-160 243.12,-156.5 243.12,-163.5"/>
</g>
<!-- ButtonModule -->
<g id="node7" class="node">
<title>ButtonModule </title>
<polygon fill="#fb8072" stroke="black" points="608.67,-252 507.33,-252 507.33,-216 608.67,-216 608.67,-252"/>
<text text-anchor="middle" x="558" y="-229.8" font-family="Times,serif" font-size="14.00">ButtonModule </text>
</g>
<!-- NFormsModule->ButtonModule -->
<g id="edge6" class="edge">
<title>NFormsModule->ButtonModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M358.77,-169C427.38,-169 538.56,-169 538.56,-169 538.56,-169 538.56,-205.89 538.56,-205.89"/>
<polygon fill="black" stroke="black" points="535.06,-205.89 538.56,-215.89 542.06,-205.89 535.06,-205.89"/>
</g>
<!-- CheckboxModule -->
<g id="node8" class="node">
<title>CheckboxModule </title>
<polygon fill="#fb8072" stroke="black" points="489.82,-252 370.18,-252 370.18,-216 489.82,-216 489.82,-252"/>
<text text-anchor="middle" x="430" y="-229.8" font-family="Times,serif" font-size="14.00">CheckboxModule </text>
</g>
<!-- NFormsModule->CheckboxModule -->
<g id="edge7" class="edge">
<title>NFormsModule->CheckboxModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M358.99,-178C391.77,-178 427.62,-178 427.62,-178 427.62,-178 427.62,-205.97 427.62,-205.97"/>
<polygon fill="black" stroke="black" points="424.13,-205.97 427.62,-215.97 431.13,-205.97 424.13,-205.97"/>
</g>
<!-- InputModule -->
<g id="node9" class="node">
<title>InputModule </title>
<polygon fill="#fb8072" stroke="black" points="352.1,-252 259.9,-252 259.9,-216 352.1,-216 352.1,-252"/>
<text text-anchor="middle" x="306" y="-229.8" font-family="Times,serif" font-size="14.00">InputModule </text>
</g>
<!-- NFormsModule->InputModule -->
<g id="edge8" class="edge">
<title>NFormsModule->InputModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M290.57,-187.11C290.57,-187.11 290.57,-205.99 290.57,-205.99"/>
<polygon fill="black" stroke="black" points="287.07,-205.99 290.57,-215.99 294.07,-205.99 287.07,-205.99"/>
</g>
<!-- NFormsModule->InputModule -->
<g id="edge9" class="edge">
<title>NFormsModule->InputModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M321.43,-187.11C321.43,-187.11 321.43,-205.99 321.43,-205.99"/>
<polygon fill="black" stroke="black" points="317.93,-205.99 321.43,-215.99 324.93,-205.99 317.93,-205.99"/>
</g>
<!-- RadioModule -->
<g id="node10" class="node">
<title>RadioModule </title>
<polygon fill="#fb8072" stroke="black" points="241.49,-252 144.51,-252 144.51,-216 241.49,-216 241.49,-252"/>
<text text-anchor="middle" x="193" y="-229.8" font-family="Times,serif" font-size="14.00">RadioModule </text>
</g>
<!-- NFormsModule->RadioModule -->
<g id="edge10" class="edge">
<title>NFormsModule->RadioModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M253.2,-178C224.93,-178 195.88,-178 195.88,-178 195.88,-178 195.88,-205.97 195.88,-205.97"/>
<polygon fill="black" stroke="black" points="192.38,-205.97 195.88,-215.97 199.38,-205.97 192.38,-205.97"/>
</g>
<!-- ToggleModule -->
<g id="node11" class="node">
<title>ToggleModule </title>
<polygon fill="#fb8072" stroke="black" points="126.21,-252 23.79,-252 23.79,-216 126.21,-216 126.21,-252"/>
<text text-anchor="middle" x="75" y="-229.8" font-family="Times,serif" font-size="14.00">ToggleModule </text>
</g>
<!-- NFormsModule->ToggleModule -->
<g id="edge11" class="edge">
<title>NFormsModule->ToggleModule </title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M253.27,-169C182.18,-169 64.38,-169 64.38,-169 64.38,-169 64.38,-205.89 64.38,-205.89"/>
<polygon fill="black" stroke="black" points="60.88,-205.89 64.38,-215.89 67.88,-205.89 60.88,-205.89"/>
</g>
</g>
</svg>
</div>
<i id="fullscreen" class="icon ion-ios-resize module-graph-fullscreen-btn" aria-hidden="true"></i>
<div class="btn-group size-buttons">
<button id="zoom-in" class="btn btn-default btn-sm">Zoom in</button>
<button id="reset" class="btn btn-default btn-sm">Reset</button>
<button id="zoom-out" class="btn btn-default btn-sm">Zoom out</button>
</div>
</div>
<script src="../js/libs/svg-pan-zoom.min.js"></script>
<script src="../js/svg-pan-zoom.controls.js"></script>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a href="#info"
class="nav-link"
class="nav-link active"
role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
</li>
<li class="nav-item">
<a href="#source"
class="nav-link"
role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="info">
<p class="comment">
<h3>File</h3>
</p>
<p class="comment">
<code>src/forms/forms.module.ts</code>
</p>
<div class="container-fluid module">
<div class="row">
<div class="col-sm-3">
<h3>Imports<a href="https://angular.io/api/core/NgModule#imports" target="_blank" rel="noopener noreferrer"
title="Official documentation about module imports"><span
class="icon ion-ios-information-circle-outline"></a></h3>
<ul class="list-group">
<li class="list-group-item">
<a href="../modules/ButtonModule.html">ButtonModule</a>
</li>
<li class="list-group-item">
<a href="../modules/CheckboxModule.html">CheckboxModule</a>
</li>
<li class="list-group-item">
<a href="../modules/InputModule.html">InputModule</a>
</li>
<li class="list-group-item">
<a href="../modules/RadioModule.html">RadioModule</a>
</li>
<li class="list-group-item">
<a href="../modules/ToggleModule.html">ToggleModule</a>
</li>
</ul>
</div>
<div class="col-sm-3">
<h3>Exports<a href="https://angular.io/api/core/NgModule#exports" target="_blank" rel="noopener noreferrer"
title="Official documentation about module exports"><span
class="icon ion-ios-information-circle-outline"></a></h3>
<ul class="list-group">
<li class="list-group-item">
<a href="../modules/ButtonModule.html">ButtonModule</a>
</li>
<li class="list-group-item">
<a href="../modules/CheckboxModule.html">CheckboxModule</a>
</li>
<li class="list-group-item">
<a href="../modules/InputModule.html">InputModule</a>
</li>
<li class="list-group-item">
<a href="../modules/InputModule.html">InputModule</a>
</li>
<li class="list-group-item">
<a href="../modules/RadioModule.html">RadioModule</a>
</li>
<li class="list-group-item">
<a href="../modules/ToggleModule.html">ToggleModule</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">// modules
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
// imports
import { CheckboxModule } from "carbon-components-angular/checkbox";
import { ToggleModule } from "carbon-components-angular/toggle";
import { RadioModule } from "carbon-components-angular/radio";
import { InputModule } from "carbon-components-angular/input";
import { ButtonModule } from "carbon-components-angular/button";
@NgModule({
exports: [
CheckboxModule,
ToggleModule,
RadioModule,
InputModule,
ButtonModule,
InputModule
],
imports: [
CommonModule,
FormsModule,
CheckboxModule,
ToggleModule,
RadioModule,
InputModule,
ButtonModule
]
})
export class NFormsModule { }
</code></pre>
</div>
</div>
</div><div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
<!-- END CONTENT -->
</div>
</div>
<label class="dark-mode-switch">
<input type="checkbox">
<span class="slider">
<svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
<path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
</svg>
</span>
</label>
<script>
var COMPODOC_CURRENT_PAGE_DEPTH = 1;
var COMPODOC_CURRENT_PAGE_CONTEXT = 'module';
var COMPODOC_CURRENT_PAGE_URL = 'NFormsModule.html';
var MAX_SEARCH_RESULTS = 15;
</script>
<script>
$darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
checkToggle(darkModeState);
if ($darkModeToggleSwitchers.length > 0) {
for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
$darkModeToggleSwitchers[i].addEventListener('change', function (event) {
darkModeState = !darkModeState;
toggleDarkMode(darkModeState);
});
}
}
</script>
<script src="../js/libs/custom-elements.min.js"></script>
<script src="../js/libs/lit-html.js"></script>
<script src="../js/menu-wc.js" defer></script>
<script nomodule src="../js/menu-wc_es5.js" defer></script>
<script src="../js/libs/bootstrap-native.js"></script>
<script src="../js/libs/es6-shim.min.js"></script>
<script src="../js/libs/EventDispatcher.js"></script>
<script src="../js/libs/promise.min.js"></script>
<script src="../js/libs/zepto.min.js"></script>
<script src="../js/compodoc.js"></script>
<script src="../js/tabs.js"></script>
<script src="../js/menu.js"></script>
<script src="../js/libs/clipboard.min.js"></script>
<script src="../js/libs/prism.js"></script>
<script src="../js/sourceCode.js"></script>
<script src="../js/search/search.js"></script>
<script src="../js/search/lunr.min.js"></script>
<script src="../js/search/search-lunr.js"></script>
<script src="../js/search/search_index.js"></script>
<script src="../js/lazy-load-graphs.js"></script>
<footer class="carbon">
<dds-footer-container key="footer" disable-locale-button="true" size="micro" />
</footer>
<script
key="8"
type="module"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js">
</script>
<!-- Storybook override -->
<script>
document.title = "Carbon Components Angular";
</script>
<script
src="//1.www.s81c.com/common/stats/ibm-common.js"
type="text/javascript"
async="async">
</script>
</body>
</html>