File

src/app/shared/models/todo.model.ts

Description

The todo class

See TodoStore for service using it

Index

Properties
Methods
Accessors

Constructor

constructor(title: string)
Parameters :
Name Type Optional
title string No

Properties

Private _title
Type : string

Title

Private #newprivateproperty
Type : boolean
Default value : false

Another private property

completed
Type : boolean

Completed status

dir
Type : Direction
Default value : Direction.Left
editing
Type : boolean

Editing status

oneProperty
Type : superString

Just for Compodoc feature demo

Methods

Private #clicked
#clicked()
Returns : void
Static classMethod
classMethod()
Returns : string
fakeMethod
fakeMethod()

fakeMethod !!

Returns : boolean

Accessors

title
gettitle()
settitle(value: string)
Parameters :
Name Type Optional
value string No
Returns : void

Todo class

import { superString } from '../interfaces/interfaces';

import { Direction } from '../enums/enum';

/**
 * The todo class
 *
 * See {@link TodoStore} for service using it
 */
export class Todo {
    /**
     * Completed status
     */
    completed: boolean;
    /**
     * Editing status
     */
    editing: boolean;

    /**
     * Just for Compodoc feature demo
     */
    oneProperty: superString;

    dir: Direction = Direction.Left;

    /**
     * Another private property
     */
    #newprivateproperty: boolean = false;

    #clicked() {
        this.editing = true;
    }

    /**
     * Title
     */
    private _title: string;
    get title() {
        return this._title;
    }
    set title(value: string) {
        this._title = value.trim();
    }

    static classMethod() {
        return 'hello';
    }

    constructor(title: string) {
        this.completed = false;
        this.editing = false;
        this.title = title.trim();
    }

    /**
     *  fakeMethod !!
     */
    fakeMethod(): boolean {
        return true;
    }
}

results matching ""

    No results matching ""