This file contains hidden or 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
const environment = { | |
mode: 'staging' | |
} | |
/*const environment = { | |
mode: 'production' | |
}*/ | |
/*const environment = { | |
mode: 'development' |
This file contains hidden or 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
//....... | |
"scripts": { | |
"build:prod": "cpy environments/environment.prod.js config --rename=index.js && npm run start", | |
"build:dev": "cpy environments/environment.dev.js config --rename=index.js && npm run start", | |
"build:staging": "cpy environments/environment.staging.js config --rename=index.js && npm run start" | |
} | |
//..... |
This file contains hidden or 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 React from 'react'; | |
import { StyleSheet } from 'react-native'; | |
import { Content, Item, Input } from 'native-base'; | |
import { Grid, Col } from 'react-native-easy-grid'; | |
class OtpInputs extends React.Component { | |
state={otp:[]}; | |
otpTextInput = []; | |
componentDidMount() { |
This file contains hidden or 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, OnInit, Input } from '@angular/core'; | |
import { Product } from '../../models/product'; | |
@Component({ | |
selector: 'app-product', | |
template: `<div> | |
<img [src]="pData.productImage" /> | |
<h3>{{ pData.productName }}</h3> | |
<h4>{{ pData.productPrice }}</h4> | |
<button *ngIf="pData.productStock;else nostock"> |
This file contains hidden or 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
<app-product (addItem)="addDataToCart($event.product)" [pData]="product" ></app-product> |
This file contains hidden or 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, Input } from '@angular/core'; | |
@Component({ | |
selector: 'app-image-with-loading', | |
templateUrl: './image-with-loading.component.html', | |
styleUrls: ['./image-with-loading.component.css'] | |
}) | |
export class ImageWithLoadingComponent { | |
@Input() loader:string='https://media.tenor.com/images/f864cbf3ea7916572605edd3b3fe637f/tenor.gif'; |
This file contains hidden or 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
<div [ngStyle]="{height:height+'px',width:width+'px'}" *ngIf="isLoading"> | |
<img [src]=loader /> | |
</div> | |
<img [src]=image [ngStyle]="{visibility:isLoading?'hidden':'',height:height+'px',width:width+'px'}" | |
(load)="hideLoader()" (error)="hideLoader()"/> |
This file contains hidden or 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
<!-- using a different loader --> | |
<app-image-with-loading | |
image="https://picsum.photos/400?image=179" | |
loader="https://media.tenor.com/images/8d483e909ec3618f521e9700d6fbf2e1/tenor.gif"> | |
</app-image-with-loading> | |
<!-- uses default loader --> | |
<app-image-with-loading | |
image="https://picsum.photos/400?image=179"> | |
</app-image-with-loading> |
This file contains hidden or 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
const INCREMENT='INCREMENT'; | |
const DECREMENT='DECREMENT'; | |
const incrementCount=()=>({ | |
type: INCREMENT | |
}); | |
const decrementCount=()=>{ | |
return { | |
type:DECREMENT |
This file contains hidden or 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 {INCREMENT,DECREMENT} from '../actions/counterActions.js'; | |
const currencyReducer=(state=0,action)=>{ | |
switch(action.type){ | |
case INCREMENT: | |
return state+1; | |
case DECREMENT: | |
return state-1; | |
default: | |
return state; |
OlderNewer