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
_title: string
Type : string

Title

completed
completed: boolean
Type : boolean

Completed status

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

Editing status

oneProperty
oneProperty: superString
Type : superString

Just for Compodoc feature demo

Methods

Static classMethod
classMethod()
Returns : string
fakeMethod
fakeMethod()

fakeMethod !!

Example :
Usage of fakeMethod

returns true;

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;

    /**
     * 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 !!
     *
     *  @example <caption>Usage of fakeMethod</caption>
     *
     *  returns true;
     *
     *  fakeMethod()
     */
    fakeMethod(): boolean {
        return true;
    }
}

result-matching ""

    No results matching ""