This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<app-custom-dropdown [formControl]="dropdownControl"></app-custom-dropdown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Input } from '@angular/core'; | |
import { Subject } from 'rxjs'; | |
@Component({ | |
selector: 'app-demo', | |
templateUrl: './demo.component.html', | |
styleUrls: ['./demo.component.scss'] | |
}) | |
export class Demo implements OnInit { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Input } from '@angular/core'; | |
import { Subject } from 'rxjs'; | |
@Component({ | |
selector: 'app-demo', | |
templateUrl: './demo.component.html', | |
styleUrls: ['./demo.component.scss'] | |
}) | |
export class Demo implements OnInit { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum Status { | |
Todo = 'todo', | |
InProgess = 'in-progess', | |
Done = 'done' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as routeConstants from 'route.constants.ts'; | |
const routes: Routes = [ | |
{ | |
path: routeConstants.LOGIN_URL, | |
component: LoginComponent, | |
}, | |
{ | |
path: routeConstants.REGISTER_URL, | |
component: RegisterComponent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// URLS | |
export const LOGIN_URL = 'login'; | |
export const REGISTER_URL = 'register'; | |
export const FORGOT_PASSWORD = 'forgot-password'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Input } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { FormControl } from '@angular/forms'; | |
@Component({ | |
selector: 'app-demo', | |
templateUrl: './demo.component.html', | |
styleUrls: ['./demo.component.scss'] | |
}) | |
export class Demo implements OnInit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Input } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { FormControl } from '@angular/forms'; | |
@Component({ | |
selector: 'app-demo', | |
templateUrl: './demo.component.html', | |
styleUrls: ['./demo.component.scss'] | |
}) | |
export class Demo implements OnInit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, forwardRef } from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
@Component({ | |
selector: 'app-custom-dropdown', | |
templateUrl: './custom-dropdown.component.html', | |
styleUrls: ['./custom-dropdown.component.scss'], | |
providers: [{ | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => CustomDropdownComponent), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CustomDropdownComponent implements OnInit, | |
ControlValueAccessor { | |
options: string[]; | |
selectedOption: string; | |
onChange: (_: any) => {}; | |
constructor() { } | |
NewerOlder