This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function search(term: string) { | |
const response = await fetch( | |
'https://services6.arcgis.com/bdPqSfflsdgFRVVM/arcgis/rest/services/Trash_Day_Schedule/FeatureServer/2/query?where=StName%20%3D%20%27' + | |
term + | |
'%27&outFields=*&outSR=4326&f=json' | |
); | |
const data = await response.json() | |
return data; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnDestroy, OnInit } from '@angular/core'; | |
import { FormControl } from '@angular/forms'; | |
import { MatDialog } from '@angular/material/dialog'; | |
import { ActivatedRoute, Router } from '@angular/router'; | |
import { | |
BoardCardData, | |
loadDescendantsFromProgramPage, | |
openWorkoutModal, | |
ProgramsFacade, | |
selectProgramFromPage, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Injectable() | |
export class Effects { | |
getPending$ = createEffect(() => | |
this.actions$.pipe( | |
ofType(ApprovalActions.getAllPendingApprovals), | |
switchMap(res => | |
this.apiService.getAllPendingApprovals() | |
), | |
map((approvals) => ApprovalActions.getAllPendingApprovalsComplete({ approvals })) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reqListener() { | |
var data = JSON.parse(this.responseText); | |
console.log(data); | |
} | |
function reqError(err) { | |
console.log('Fetch Error :-S', err); | |
} | |
var request = new XMLHttpRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tns build ios --release --bundle --env.launch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
import { Dashboard } from '~/app/models'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export abstract class ApiBaseService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createAction, props } from '@ngrx/store'; | |
export const get = createAction( | |
'[Job] get' | |
); | |
export const getComplete = createAction( | |
'[Job] getComplete', | |
props<{ job: any }>() | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createAction, props } from '@ngrx/store'; | |
export const get = createAction( | |
'[Job] get' | |
); | |
export const getComplete = createAction( | |
'[Job] getComplete', | |
props<{ job: any }>() | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Read more: https://blog.angularindepth.com/ngrx-action-creators-redesigned-d396960e46da | |
Description: Alex Okrushko goes in detail on what makes this so good. | |
*/ | |
import { createAction, props } from '@ngrx/store'; | |
export const submit = createAction( | |
'[New Expense] submit', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Testing | |
## using @angular-devkit/schematics | |
schematics .:login --name=snapchat | |
# Production | |
## using @angular/cli with shorthand | |
ng generate @acme/schematics:login snapchat | |
## using @angular/cli | |
ng generate @acme/schematics:login --name=snapchat |
NewerOlder