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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "command": "npm run start:dev", | |
| "name": "Run npm start", | |
| "request": "launch", | |
| "type": "node-terminal" | |
| }, | |
| { |
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
| { | |
| "expo": { | |
| // ... | |
| "jsEngine": "hermes", | |
| "ios": { | |
| "jsEngine": "jsc" | |
| } | |
| // ... | |
| } | |
| } |
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
| { | |
| "expo": { | |
| // ... | |
| "plugins": ["expo-community-flipper"], | |
| // .... | |
| } | |
| } |
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 { connectToDevTools } from 'react-devtools-core'; | |
| if (__DEV__) { | |
| connectToDevTools({ | |
| host: "localhost", | |
| port: 8097, | |
| }); | |
| } |
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
| { | |
| "cli": { | |
| "version": ">= 0.54.1" | |
| }, | |
| "build": { | |
| "base": { | |
| "env": {} | |
| }, | |
| "development": { | |
| "extends": "base", |
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
| npm install -g expo-cli |
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
| form: SubmitFormGroup; | |
| ngOnInit() { | |
| this.bindForm(); | |
| } | |
| submit(): void { | |
| console.log('form submitted', this.form.value); | |
| } |
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> | |
| <h2>3) Using our custom submission form</h2><br> | |
| <app-submit-form [formGroup]="form" (onSubmit)="submit()"> | |
| <label for="name">Name*</label><br> | |
| <input id="name" name="name" type="text" formControlName="name"/> | |
| <app-field-errors [control]="form.get('name')" [label]="'Name'"></app-field-errors> | |
| <br><br> | |
| <label for="email">Email*</label><br> | |
| <input id="email" name="email" formControlName="email"/> |
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
| export const messages = { | |
| required: 'Required field', | |
| maxlength: ':field: must be at most :n: characters length.', | |
| minlength: ':field: must be at least :n: characters length.', | |
| max: ':field: must be at most :n:.', | |
| min: ':field: must be at least :n:.', | |
| digits: 'Only digits are allowed', | |
| email: 'Please enter a valid email address', | |
| emailRegistered: 'The email is already registered' | |
| }; |
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
| @Injectable({ providedIn: 'root' }) | |
| export class MessageService { | |
| get(key: string): string { | |
| return messages[key] || key; | |
| } | |
| } |
NewerOlder