src/app/shared/models/todo.model.ts
The todo class See TodoStore for service using it
Properties |
|
Methods |
|
Accessors |
constructor(title: string)
|
||||||
|
Defined in src/app/shared/models/todo.model.ts:66
|
||||||
|
The todo constructor Watch TodoStore for service using it
Parameters :
|
| Private _title |
Type : string
|
|
Defined in src/app/shared/models/todo.model.ts:41
|
|
Title |
| Private #newprivateproperty |
Type : boolean
|
Default value : false
|
|
Defined in src/app/shared/models/todo.model.ts:26
|
|
Another private property |
| completed |
Type : boolean
|
|
Defined in src/app/shared/models/todo.model.ts:15
|
|
Completed status |
| dir |
Type : Direction
|
Default value : Direction.Left
|
|
Defined in src/app/shared/models/todo.model.ts:36
|
| editing |
Type : boolean
|
|
Defined in src/app/shared/models/todo.model.ts:19
|
|
Editing status |
| Private Optional optionalProperty |
Type : boolean
|
|
Defined in src/app/shared/models/todo.model.ts:28
|
| Optional pos |
Type : PopupPosition
|
|
Defined in src/app/shared/models/todo.model.ts:21
|
| url2state |
Default value : () => {...}
|
|
Defined in src/app/shared/models/todo.model.ts:96
|
| Private #clicked |
#clicked()
|
|
Defined in src/app/shared/models/todo.model.ts:107
|
|
Returns :
void
|
| Abstract abstractMethod | ||||||
abstractMethod(input: string)
|
||||||
|
Defined in src/app/shared/models/todo.model.ts:92
|
||||||
|
Parameters :
Returns :
string
|
| Async asyncMethod |
asyncMethod()
|
|
Defined in src/app/shared/models/todo.model.ts:94
|
|
Returns :
any
|
| azert |
azert()
|
|
Defined in src/app/shared/models/todo.model.ts:88
|
|
Returns :
number
|
| Static classMethod |
classMethod()
|
|
Defined in src/app/shared/models/todo.model.ts:56
|
|
Returns :
string
|
| fakeMethod |
fakeMethod()
|
|
Defined in src/app/shared/models/todo.model.ts:84
|
|
fakeMethod !! @example
Example :
Usage of fakeMethod
returns true;
fakeMethod()
Returns :
boolean
|
| testCommentFunction |
testCommentFunction(dig: number, str: string, bool: boolean)
|
|
Defined in src/app/shared/models/todo.model.ts:32
|
|
Returns :
object
|
[index: number]:
|
|
Defined in src/app/shared/models/todo.model.ts:28
|
| title | ||||||||
gettitle()
|
||||||||
|
Defined in src/app/shared/models/todo.model.ts:45
|
||||||||
|
|
||||||||
settitle(value: string)
|
||||||||
|
Defined in src/app/shared/models/todo.model.ts:52
|
||||||||
|
Setter of _title
Parameters :
Returns :
void
|
| runtimePath |
getruntimePath()
|
|
Defined in src/app/shared/models/todo.model.ts:64
|
|
Returns the runtime path |
import { ElementRef } from '@angular/core';
import { Direction } from '../miscellaneous/miscellaneous';
export class Tada {}
/**
* The todo class
* See {@link TodoStore} for service using it
*/
export class Todo extends Tada {
/**
* Completed status
*/
completed: boolean;
/**
* Editing status
*/
editing: boolean;
pos?: PopupPosition;
/**
* Another private property
*/
#newprivateproperty: boolean = false;
private optionalProperty?: boolean;
[index: number]: string;
testCommentFunction(dig: number, str: string, bool: boolean): object {
return {};
}
dir: Direction = Direction.Left;
/**
* Title
*/
private _title: string;
/**
* @return {string} _title value
*/
get title() {
return this._title;
}
/**
* Setter of _title
* @param {string} value The new title
*/
set title(value: string) {
this._title = value.trim();
}
static classMethod() {
return 'hello';
}
/**
* Returns the runtime path
* @returns {string}
*/
get runtimePath() {
return this._options.runtimePath;
}
/**
* The todo constructor
* Watch {@link TodoStore} for service using it
*/
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;
}
azert() {
return 5;
}
abstract abstractMethod(input: string): string;
async asyncMethod() {}
url2state = async <T>(defaults: Partial<T>) =>
await this.route.queryParamMap
.pipe(
/** use first to make sure this only runs at component init time */
first(),
map(r => {}),
catchError(e => {})
)
/** cast observable to promise */
.toPromise();
#clicked() {
this.editing = true;
}
}
export type PopupPosition = ElementRef | HTMLElement;