src/providers/quotation/quotation.ts
Properties |
|
Methods |
constructor(http: HttpClient)
|
||||||
Defined in src/providers/quotation/quotation.ts:13
|
||||||
Parameters :
|
addQuote |
addQuote(name: string, amount: number)
|
Defined in src/providers/quotation/quotation.ts:23
|
Returns :
void
|
attempt |
attempt()
|
Defined in src/providers/quotation/quotation.ts:18
|
Returns :
void
|
getNumQuoteItems |
getNumQuoteItems()
|
Defined in src/providers/quotation/quotation.ts:32
|
Returns :
any
|
getQuoteList |
getQuoteList()
|
Defined in src/providers/quotation/quotation.ts:40
|
Returns :
{}
|
isQuoteStarted |
isQuoteStarted()
|
Defined in src/providers/quotation/quotation.ts:36
|
Returns :
boolean
|
Public http |
http:
|
Type : HttpClient
|
Defined in src/providers/quotation/quotation.ts:15
|
Private quoteList |
quoteList:
|
Type : any[]
|
Default value : []
|
Defined in src/providers/quotation/quotation.ts:12
|
Private quoteStarted |
quoteStarted:
|
Default value : false
|
Defined in src/providers/quotation/quotation.ts:13
|
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
/*
Generated class for the QuotationProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
@Injectable()
export class QuotationProvider {
private quoteList: any[] = [];
private quoteStarted = false;
constructor(public http: HttpClient) {
console.log('Hello QuotationProvider Provider');
}
attempt()
{
alert("aefwe");
}
addQuote(name: string, amount: number) {
const quote = {
'name': name,
'amount': amount
};
this.quoteList.push(quote);
this.quoteStarted = true;
}
getNumQuoteItems() {
return this.quoteList.length;
}
isQuoteStarted() {
return this.quoteStarted;
}
getQuoteList() {
return this.quoteList;
}
}