10000 angular-code-input/angular-code-input at master · leobia/angular-code-input · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"angular-code-input","repo":{"id":798695161,"defaultBranch":"master","name":"angular-code-input","ownerLogin":"leobia","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-05-10T09:47:35.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/26444579?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1715334461.892661","canEdit":false,"refType":"branch","currentOid":"0c418993d4e56958fba2f73fbd7275df1973f1e7"},"tree":{"items":[{"name":"src","path":"angular-code-input/src","contentType":"directory"},{"name":"CHANGELOG.md","path":"angular-code-input/CHANGELOG.md","contentType":"file"},{"name":"LICENSE","path":"angular-code-input/LICENSE","contentType":"file"},{"name":"README.md","path":"angular-code-input/README.md","contentType":"file"},{"name":"karma.conf.js","path":"angular-code-input/karma.conf.js","contentType":"file"},{"name":"ng-package.json","path":"angular-code-input/ng-package.json","contentType":"file"},{"name":"package.json","path":"angular-code-input/package.json","contentType":"file"},{"name":"tsconfig.lib.json","path":"angular-code-input/tsconfig.lib.json","contentType":"file"},{"name":"tsconfig.lib.prod.json","path":"angular-code-input/tsconfig.lib.prod.json","contentType":"file"},{"name":"tsconfig.spec.json","path":"angular-code-input/tsconfig.spec.json","contentType":"file"},{"name":"tslint.json","path":"angular-code-input/tslint.json","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCode/pincode input component for angular\u003c/h1\u003e\u003ca id=\"user-content-codepincode-input-component-for-angular\" class=\"anchor\" aria-label=\"Permalink: Code/pincode input component for angular\" href=\"#codepincode-input-component-for-angular\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/6cc633330b5a86ffe09d53c957de52b2b14afb32e4c40d520454ab530e6851e1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f616e67756c61722d636f64652d696e7075743f636f6c6f723d353561613333\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/6cc633330b5a86ffe09d53c957de52b2b14afb32e4c40d520454ab530e6851e1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f616e67756c61722d636f64652d696e7075743f636f6c6f723d353561613333\" alt=\"\" data-canonical-src=\"https://img.shields.io/npm/dm/angular-code-input?color=55aa33\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/6dca45280af1852c6d176e3e958e2c3b1c2c545f51b61e0597d08c6f5db128bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f416c65784d696e69417070732f616e67756c61722d636f64652d696e707574\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/6dca45280af1852c6d176e3e958e2c3b1c2c545f51b61e0597d08c6f5db128bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f416c65784d696e69417070732f616e67756c61722d636f64652d696e707574\" alt=\"\" data-canonical-src=\"https://img.shields.io/github/stars/AlexMiniApps/angular-code-input\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/78262cbd510fa641d5722596b028700690bbb8274cc34ccec3977dc1cfab4263/68747470733a2f2f62616467656e2e6e65742f62616467652f69636f6e2f747970657363726970743f69636f6e3d74797065736372697074266c6162656c26636f6c6f723d393961616262\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/78262cbd510fa641d5722596b028700690bbb8274cc34ccec3977dc1cfab4263/68747470733a2f2f62616467656e2e6e65742f62616467652f69636f6e2f747970657363726970743f69636f6e3d74797065736372697074266c6162656c26636f6c6f723d393961616262\" alt=\"\" data-canonical-src=\"https://badgen.net/badge/icon/typescript?icon=typescript\u0026amp;label\u0026amp;color=99aabb\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/8b0ebf442bbcea691047cc02e7554753f97434303b48ad92ae06013e00d11b7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f416c65784d696e69417070732f616e67756c61722d636f64652d696e7075743f636f6c6f723d303063636262\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/8b0ebf442bbcea691047cc02e7554753f97434303b48ad92ae06013e00d11b7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f416c65784d696e69417070732f616e67756c61722d636f64652d696e7075743f636f6c6f723d303063636262\" alt=\"\" data-canonical-src=\"https://img.shields.io/github/license/AlexMiniApps/angular-code-input?color=00ccbb\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eRobust and \u003cb\u003etested\u003c/b\u003e code (number/chars) input component for Angular 7 - 16+ projects.\u003cbr\u003e\nIonic 4 - 7+ is supported, can be used in iOS and Android.\u003cbr\u003e\n\u003cb\u003eClipboard\u003c/b\u003e events are supported.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eStar it to inspire us to build the best component! \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/AlexMiniApps/angular-code-input/blob/master/star.jpg\"\u003e\u003cimg src=\"https://github.com/AlexMiniApps/angular-code-input/raw/master/star.jpg\" alt=\"Star\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003ePreview\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/AlexMiniApps/angular-code-input/blob/master/preview1.gif\"\u003e\u003cimg src=\"https://github.com/AlexMiniApps/angular-code-input/raw/master/preview1.gif\" alt=\"\" data-animated-image=\"\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/AlexMiniApps/angular-code-input/blob/master/preview2.gif\"\u003e\u003cimg src=\"https://github.com/AlexMiniApps/angular-code-input/raw/master/preview2.gif\" alt=\"\" data-animated-image=\"\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSupported platforms\u003c/h2\u003e\u003ca id=\"user-content-supported-platforms\" class=\"anchor\" aria-label=\"Permalink: Supported platforms\" href=\"#supported-platforms\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cb\u003eAngular\u003c/b\u003e 7 - 16+\u003cbr\u003e\n\u003cb\u003eIonic\u003c/b\u003e 4 - 7+\u003cbr\u003e\nMobile browsers and WebViews on: \u003cb\u003eAndroid\u003c/b\u003e and \u003cb\u003eiOS\u003c/b\u003e\u003cbr\u003e\nDesktop browsers: \u003cb\u003eChrome, Firefox, Safari, Edge v.79 +\u003c/b\u003e\u003cbr\u003e\nOther browsers: \u003cb\u003eEdge v.41 - 44\u003c/b\u003e (without code hidden feature)\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstallation\u003c/h2\u003e\u003ca id=\"user-content-installation\" class=\"anchor\" aria-label=\"Permalink: Installation\" href=\"#installation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"$ npm install --save angular-code-input\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e$ npm install --save angular-code-input\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eChoose the version corresponding to your Angular version:\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eAngular\u003c/th\u003e\n\u003cth\u003eangular-code-input\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e16+\u003c/td\u003e\n\u003ctd\u003e2.x+\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e7-15\u003c/td\u003e\n\u003ctd\u003e1.x+\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUsage\u003c/h2\u003e\u003ca id=\"user-content-usage\" class=\"anchor\" aria-label=\"Permalink: Usage\" href=\"#usage\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eImport \u003ccode\u003eCodeInputModule\u003c/code\u003e in your app module or page module:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import { CodeInputModule } from 'angular-code-input';\n\n@NgModule({\n imports: [\n // ...\n CodeInputModule\n ]\n})\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCodeInputModule\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'angular-code-input'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n@\u003cspan class=\"pl-v\"\u003eNgModule\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eimports\u003c/span\u003e: \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e// ...\u003c/span\u003e\n \u003cspan class=\"pl-v\"\u003eCodeInputModule\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIt is possible to configure the component across the app using the root config. In such case the import will look as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"import { CodeInputModule } from 'angular-code-input';\n\n@NgModule({\n imports: [\n // ...\n CodeInputModule.forRoot({\n codeLength: 6,\n isCharsCode: true,\n code: 'abcdef'\n }),\n ]\n})\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e \u003cspan class=\"pl-v\"\u003eCodeInputModule\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'angular-code-input'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n@\u003cspan class=\"pl-v\"\u003eNgModule\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eimports\u003c/span\u003e: \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\n \u003cspan class=\"pl-c\"\u003e// ...\u003c/span\u003e\n \u003cspan class=\"pl-v\"\u003eCodeInputModule\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003eforRoot\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003ecodeLength\u003c/span\u003e: \u003cspan class=\"pl-c1\"\u003e6\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eisCharsCode\u003c/span\u003e: \u003cspan class=\"pl-c1\"\u003etrue\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003ecode\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e'abcdef'\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eInclude the component on page template HTML:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-basic notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\" \u0026lt;code-input [isCodeHidden]=\u0026quot;true\u0026quot;\n [codeLength]=\u0026quot;5\u0026quot;\n (codeChanged)=\u0026quot;onCodeChanged($event)\u0026quot;\n (codeCompleted)=\u0026quot;onCodeCompleted($event)\u0026quot;\u0026gt;\n\u0026lt;/code-input\u0026gt;\"\u003e\u003cpre\u003e \u003cspan class=\"pl-kos\"\u003e\u0026lt;\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ecode-input\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e[isCodeHidden]\u003c/span\u003e=\"\u003cspan class=\"pl-s\"\u003etrue\u003c/span\u003e\"\n \u003cspan class=\"pl-c1\"\u003e[codeLength]\u003c/span\u003e=\"\u003cspan class=\"pl-s\"\u003e5\u003c/span\u003e\"\n \u003cspan class=\"pl-c1\"\u003e(codeChanged)\u003c/span\u003e=\"\u003cspan class=\"pl-s\"\u003eonCodeChanged($event)\u003c/span\u003e\"\n \u003cspan class=\"pl-c1\"\u003e(codeCompleted)\u003c/span\u003e=\"\u003cspan class=\"pl-s\"\u003eonCodeCompleted($event)\u003c/span\u003e\"\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e\u0026lt;/\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ecode-input\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eInside a page script:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\" // this called every time when user changed the code\nonCodeChanged(code: string) {\n}\n\n// this called only if user entered full code\nonCodeCompleted(code: string) {\n}\"\u003e\u003cpre\u003e \u003cspan class=\"pl-c\"\u003e// this called every time when user changed the code\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eonCodeChanged\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecode\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e// this called only if user entered full code\u003c/span\u003e\n\u003cspan class=\"pl-en\"\u003eonCodeCompleted\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003ecode\u003c/span\u003e: \u003cspan class=\"pl-s1\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eConfiguration\u003c/h2\u003e\u003ca id=\"user-content-configuration\" class=\"anchor\" aria-label=\"Permalink: Configuration\" href=\"#configuration\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eView\u003c/h4\u003e\u003ca id=\"user-content-view\" class=\"anchor\" aria-label=\"Permalink: View\" href=\"#view\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIt is possible to configure the component via CSS vars\n\u003cbr\u003eor using \u003ccode\u003e::ng-deep\u003c/code\u003e (deprecated) angular CSS selector\n\u003ca href=\"https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep\" rel=\"nofollow\"\u003e::ng-deep\u003c/a\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eCSS vars:\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eCSS Var\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--text-security-type: disc;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eText presentation type when the isCodeHidden is enabled\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-spacing: 4px;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eHorizontal space between input items\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-height: 4.375em;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eHeight of input items\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBorder of input item for an empty value\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-bottom: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBottom border of input item for an empty value\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-has-value: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBorder of input item with a value\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-bottom-has-value: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBottom border of input item with a value\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-focused: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBorder of input item when focused\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-bottom-focused: 1px solid #dddddd;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBottom border of input item when focused\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-shadow-focused: 0px 1px 5px rgba(221, 221, 221, 1);\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eShadow of input item when focused\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-border-radius: 5px;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eBorder radius of input item\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-background: transparent;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eInput item background\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--item-font-weight: 300;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eFont weight of input item\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003e--color: #171516;\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eText color of input items\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cp dir=\"auto\"\u003eExample with only bottom borders:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"/* inside page styles*/\n...\n code-input {\n --item-spacing: 10px;\n --item-height: 3em;\n --item-border: none;\n --item-border-bottom: 2px solid #dddddd;\n --item-border-has-value: none;\n --item-border-bottom-has-value: 2px solid #888888;\n --item-border-focused: none;\n --item-border-bottom-focused: 2px solid #809070;\n --item-shadow-focused: none;\n --item-border-radius: 0px;\n }\n...\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e/* inside page styles*/\n...\n code-input {\n --item-spacing: 10px;\n --item-height: 3em;\n --item-border: none;\n --item-border-bottom: 2px solid #dddddd;\n --item-border-has-value: none;\n --item-border-bottom-has-value: 2px solid #888888;\n --item-border-focused: none;\n --item-border-bottom-focused: 2px solid #809070;\n --item-shadow-focused: none;\n --item-border-radius: 0px;\n }\n...\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eComponent options\u003c/h4\u003e\u003ca id=\"user-content-component-options\" class=\"anchor\" aria-label=\"Permalink: Component options\" href=\"#component-options\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eProperty\u003c/th\u003e\n\u003cth align=\"center\"\u003eType\u003c/th\u003e\n\u003cth align=\"center\"\u003eDefault\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003ecodeLength\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003enumber\u003c/td\u003e\n\u003ctd align=\"center\"\u003e4\u003c/td\u003e\n\u003ctd\u003eLength of input code\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003einputType\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003estring\u003c/td\u003e\n\u003ctd align=\"center\"\u003etel\u003c/td\u003e\n\u003ctd\u003eType of the input DOM elements like \u003ccode\u003e\u0026lt;input [type]=\"inputType\"/\u0026gt;\u003c/code\u003e default '\u003ccode\u003etel'\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003eisCodeHidden\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003eboolean\u003c/td\u003e\n\u003ctd align=\"center\"\u003efalse\u003c/td\u003e\n\u003ctd\u003eWhen \u003ccode\u003etrue\u003c/code\u003e inputted code chars will be shown as asterisks (points)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003eisCharsCode\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003eboolean\u003c/td\u003e\n\u003ctd align=\"center\"\u003efalse\u003c/td\u003e\n\u003ctd\u003eWhen \u003ccode\u003etrue\u003c/code\u003e inputted code can contain any char and not only digits from 0 to 9. If the input parameter \u003cb\u003e\u003ccode\u003ecode\u003c/code\u003e\u003c/b\u003e contains non digits chars and \u003ccode\u003eisCharsCode\u003c/code\u003e is \u003ccode\u003efalse\u003c/code\u003e the value will be ignored\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003eisPrevFocusableAfterClearing\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003eboolean\u003c/td\u003e\n\u003ctd align=\"center\"\u003etrue\u003c/td\u003e\n\u003ctd\u003eWhen \u003ccode\u003etrue\u003c/code\u003e after the input value deletion the caret will be moved to the previous input immediately. If \u003ccode\u003efalse\u003c/code\u003e then after the input value deletion the caret will stay on the current input and be moved to the previous input only if the current input is empty\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003eisFocusingOnLastByClickIfFilled\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003eboolean\u003c/td\u003e\n\u003ctd align=\"center\"\u003efalse\u003c/td\u003e\n\u003ctd\u003eWhen \u003ccode\u003etrue\u003c/code\u003e and the code is filled then the focus will be moved to the last input element when clicked\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003einitialFocusField\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003enumber\u003c/td\u003e\n\u003ctd align=\"center\"\u003e-\u003c/td\u003e\n\u003ctd\u003eThe index of the input box for initial focusing. When the component will appear the focus will be placed on the input with this index. \u003cbr\u003e Note: If you need to dynamically hide the component it is needed to use \u003cb\u003e*ngIf\u003c/b\u003e directive instead of the \u003ccode\u003e[hidden]\u003c/code\u003e attribute\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003ecode\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003estring / number\u003c/td\u003e\n\u003ctd align=\"center\"\u003e-\u003c/td\u003e\n\u003ctd\u003eThe input code value for the component. If the parameter contains non digits chars and \u003ccode\u003eisCharsCode\u003c/code\u003e is \u003ccode\u003efalse\u003c/code\u003e the value will be \u003cb\u003eignored\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003edisabled\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003eboolean\u003c/td\u003e\n\u003ctd align=\"center\"\u003efalse\u003c/td\u003e\n\u003ctd\u003eWhen \u003ccode\u003etrue\u003c/code\u003e then the component will not handle user actions, like in regular html input element with the \u003ccode\u003edisabled\u003c/code\u003e attribute\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003eautocapitalize\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003estring\u003c/td\u003e\n\u003ctd align=\"center\"\u003e-\u003c/td\u003e\n\u003ctd\u003eThe autocapitalize attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch4 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eEvents\u003c/h4\u003e\u003ca id=\"user-content-events\" class=\"anchor\" aria-label=\"Permalink: Events\" href=\"#events\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eEvent\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecodeChanged\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eWill be called every time when a user changed the code\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ccode\u003ecodeCompleted\u003c/code\u003e\u003c/td\u003e\n\u003ctd\u003eWill be called only if a user entered full code\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eMethods\u003c/h2\u003e\u003ca id=\"user-content-methods\" class=\"anchor\" aria-label=\"Permalink: Methods\" href=\"#methods\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eFor calling the component's methods it is required to access the component inside the template or page script.\nIt can be reached as follows.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eInside the page template HTML add a template ref:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-html-basic notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\u0026lt;code-input\n ...\n #codeInput\n ...\n\u0026gt;\n\u0026lt;/code-input\u0026gt;\"\u003e\u003cpre\u003e\u003cspan class=\"pl-kos\"\u003e\u0026lt;\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ecode-input\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e...\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e#codeInput\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003e...\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e\u0026lt;/\u003c/span\u003e\u003cspan class=\"pl-ent\"\u003ecode-input\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e\u0026gt;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eInside a page script attach the component:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"...\n// adding to the imports\nimport {CodeInputComponent} from 'angular-code-input';\n...\n// adding to the page props\n@ViewChild('codeInput') codeInput !: CodeInputComponent;\n...\n// calling the component's methods somewhere in the page.\n// IMPORTANT: it will be accessible only after the view initialization!\nthis.codeInput.reset();\"\u003e\u003cpre\u003e...\n\u003cspan class=\"pl-c\"\u003e// adding to the imports\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\u003cspan class=\"pl-v\"\u003eCodeInputComponent\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efrom\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'angular-code-input'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n...\n\u003cspan class=\"pl-c\"\u003e// adding to the page props\u003c/span\u003e\n@\u003cspan class=\"pl-v\"\u003eViewChild\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'codeInput'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecodeInput\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e!\u003c/span\u003e: \u003cspan class=\"pl-v\"\u003eCodeInputComponent\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n...\n\u003cspan class=\"pl-c\"\u003e// calling the component's methods somewhere in the page.\u003c/span\u003e\n\u003cspan class=\"pl-c\"\u003e// IMPORTANT: it will be accessible only after the view initialization!\u003c/span\u003e\n\u003cspan class=\"pl-smi\"\u003ethis\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ecodeInput\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ereset\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eMethod\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003efocusOnField(index: number): void\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003eFocuses the input caret on the input box with the passed index\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cb\u003e\u003ccode\u003ereset(isChangesEmitting = false): void\u003c/code\u003e\u003c/b\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp dir=\"auto\"\u003eResets the component values in the following way:\u003c/p\u003e\u003cp dir=\"auto\"\u003eif the \u003ccode\u003ecode\u003c/code\u003e option is supplied then the value will be reset to the \u003ccode\u003ecode\u003c/code\u003e option value. If the \u003ccode\u003ecode\u003c/code\u003e option is not supplied then the component will be reset to empty values.\u003c/p\u003e\u003cp dir=\"auto\"\u003eif the \u003ccode\u003einitialFocusField\u003c/code\u003e option is supplied then the caret will be focused in that filed after reset.\u003c/p\u003e\u003cp dir=\"auto\"\u003eif the \u003ccode\u003eisChangesEmitting\u003c/code\u003e param is passed then changes will be emitted\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Code/pincode input component for angular","anchor":"codepincode-input-component-for-angular","htmlText":"Code/pincode input component for angular"},{"level":2,"text":"Supported platforms","anchor":"supported-platforms","htmlText":"Supported platforms"},{"level":2,"text":"Installation","anchor":"installation","htmlText":"Installation"},{"level":2,"text":"Usage","anchor":"usage","htmlText":"Usage"},{"level":2,"text":"Configuration","anchor":"configuration","htmlText":"Configuration"},{"level":4,"text":"View","anchor":"view","htmlText":"View"},{"level":4,"text":"Component options","anchor":"component-options","htmlText":"Component options"},{"level":4,"text":"Events","anchor":"events","htmlText":"Events"},{"level":2,"text":"Methods","anchor":"methods","htmlText":"Methods"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fleobia%2Fangular-code-input%2Ftree%2Fmaster%2Fangular-code-input"}},"totalCount":11,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":"angular-code-input","path":"angular-code-input","contentType":"directory"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"angular.json","path":"angular.json","contentType":"file"},{"name":"package-lock.json","path":"package-lock.json","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"preview1.gif","path":"preview1.gif","contentType":"file"},{"name":"preview2.gif","path":"preview2.gif","contentType":"file"},{"name":"star.jpg","path":"star.jpg","contentType":"file"},{"name":"tsconfig.json","path":"tsconfig.json","contentType":"file"},{"name":"tslint.json","path":"tslint.json","contentType":"file"}],"totalCount":13}},"fileTreeProcessingTime":8.151463,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/leobia/angular-code-input/branches":{"post":"y84srtD-0eLeV8Hu2BNOu5dQ5mBqUqEEXBvmhbKsA7cu7hB9wjgIDFGS_R7VVt4qn5yWnVt3_GFVeLhF9aI6jQ"},"/leobia/angular-code-input/branches/fetch_and_merge/master":{"post":"51FsSDaXU3B571AyJXyxiCgN9IiVl6cwAdu8IeuAh2gRBzIuxsoQWBBQkL4seAyMvJucwoMQcFKVIEYJb_wwag"},"/leobia/angular-code-input/branches/fetch_and_merge/master?discard_changes=true":{"post":"gvGjeI1fde3g6xdL36wUObiVyXRnJ4BP-4Rq1oxtQhp0p_0efQI2xYlU18fWqKk9LAOhPnGgVy1vf5D-CBH1GA"}}},"title":"angular-code-input/angular-code-input at master · leobia/angular-code-input","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0