Skip to content

Instantly share code, notes, and snippets.

Anas R. Firdousi afirdousi

Block or report user

Report or block afirdousi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View custom-input-light.component.css
input {
border:1px solid #0080ff;
background-color:#fff;
color:#0080ff;
}
input:disabled,
input[disabled]{
border:1px solid #d3d3d3;
background-color:#fafafa;
View common.component.css
input {
cursor:pointer;
padding:10px;
}
input:disabled,
input[disabled]{
cursor:auto;
}
View custom-button.component.css
input {
cursor:pointer;
padding:10px;
border:1px solid #0080ff;
background-color:#fff;
color:#0080ff;
}
input:disabled,
input[disabled]{
View custom-input.component.html
<div class="cell" [ngClass]="classes">
<label class="label">
<span [innerHTML]="label"></span>
</label>
<input type="text"
class="input"
[disabled]="disabled"
[placeholder]="placeholder">
<div class="alert"> {{ alert }} </div>
</div>
View custom-button.component.ts
import { Component, Input } from '@angular/core';
@Component({
selector: 'custom-button',
templateUrl: 'src/custom-button.component.html',
styleUrls: ['src/custom-button.component.css']
})
export class CustomButton {
classes: string;
View custom-input.component.ts
import { Component, Input } from '@angular/core';
@Component({
selector: 'custom-input',
templateUrl: 'src/custom-input.component.html',
styleUrls: ['src/custom-input.component.css']
})
export class CustomInput {
classes: string;
View custom-range.component.ts
export class CustomRange extends AbstractValueAccessor<number> {
@Input() label: string;
}
View cus
export class CustomInput extends AbstractValueAccessor<string> {
@Input() label: string;
}
View abstract-value-accessor.ts
export abstract class AbstractValueAccessor<T> implements ControlValueAccessor {
_value: T = '';
get value(): T { return this._value; };
set value(v: T) {
if (v !== this._value) {
this._value = v;
this.onChange(v);
}
}
View make-provider.ts
export function MakeProvider(type : any){
return {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => type),
multi: true
};
}
You can’t perform that action at this time.