OnInit: Perform component initalization. ex. retrieve data
OnChanges: Perform action after change input properties ex. interactivity
OnDestroy: Perform cleanup
mtype = {PLN2, PLN5, MILK, DARK} | |
chan k = [0] of {mtype}; | |
proctype Lasuch(){ | |
do | |
:: k!PLN2 | |
printf("Wyprodukowalem %e\n", PLN2); | |
:: k!PLN5 | |
printf("Wyprodukowalem %e\n", PLN5); | |
od |
FROM node:8.1.2-onbuild as builder | |
ARG TARGET=production | |
RUN npm install @angular/cli | |
RUN node_modules/.bin/ng build -aot --target ${TARGET} | |
FROM nginx:1.13-alpine | |
COPY nginx.conf /etc/nginx/conf.d/ | |
COPY --from=builder /usr/src/app/dist /usr/src/app |
OnInit: Perform component initalization. ex. retrieve data
OnChanges: Perform action after change input properties ex. interactivity
OnDestroy: Perform cleanup
import { Injectable } from '@angular/core'; | |
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
@Injectable() | |
export class AuthInterceptor implements HttpInterceptor { | |
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { | |
const user = JSON.parse(localStorage.getItem('user')); | |
if (user && user.token) { | |
request = request.clone({ |
id | nazwa miasta | nazwa województwa | |
---|---|---|---|
1 | Bolesławiec | DOLNOŚLĄSKIE | |
2 | Nowogrodziec | DOLNOŚLĄSKIE | |
3 | Bielawa | DOLNOŚLĄSKIE | |
4 | Dzierżoniów | DOLNOŚLĄSKIE | |
5 | Pieszyce | DOLNOŚLĄSKIE | |
6 | Piława Górna | DOLNOŚLĄSKIE | |
7 | Niemcza | DOLNOŚLĄSKIE | |
8 | Głogów | DOLNOŚLĄSKIE | |
9 | Góra | DOLNOŚLĄSKIE |
iFrameResize({ | |
log: false, | |
enablePublicMethods: true, | |
heightCalculationMethod: 'taggedElement', | |
}, '#myIframe') | |
var eventMethod = window.addEventListener | |
? "addEventListener" | |
: "attachEvent"; |