@hossam.ahmed/required-decorator
v1.0.4
Published
A type-script decorator to mark a class property as required property
Downloads
2
Readme
RequiredDecorator
A normal typescript decorator used to mark an angular component property as required. Forces component users to provide a value for the property, otherwise application will throw exceptions
Quick Start
import { Required } from "@hossam.ahmed/required-decorator"
Angular Version
This library is built to work with Angular 4+.
Example
// example.component.ts
import {Required} from '@hossam.ahmed/required-decorator';
@Component({
selector: "app-example",
template: "Welcome {{ title }}"
})
export class ExampleComponent {
@Required() title: string;
}