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
| true + true === 2; | |
| true – true === 0; | |
| true === 1; |
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 class SearchForm extends Vue { | |
| name: 'SearchForm', | |
| props: { | |
| colot: { | |
| type: Object | |
| } | |
| }, | |
| data(){ | |
| return { | |
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, Prop, Vue, Watch, Emit } from 'vue-property-decorator'; | |
| @Component | |
| export class SearchForm extends Vue { | |
| public search: string = 'vue'; | |
| @Prop() private color!: string; | |
| @Watch('search') | |
| @Emit('search:text') | |
| private onSeachChanged(val: string, oldVal: string) { | |
| return val; |
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 { ListItem } from '@/types/index'; | |
| import { Component, Prop, Model, Provide, Watch, Vue } from 'vue-property-decorator'; | |
| import LIST from './../../../data/starters'; | |
| import SearchItem from './SearchItem.vue'; | |
| import SearchForm from './SearchForm.vue'; | |
| @Component({ | |
| name: 'Search', | |
| components: { | |
| SearchItem, |
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 { ListItem } from '@/types/index'; | |
| import { Component, Vue } from 'vue-property-decorator'; | |
| import LIST from '../data/mockData.json'; | |
| import SearchItem from './SearchItem.vue'; | |
| import SearchForm from './SearchForm.vue'; | |
| // setting child components | |
| @Component({ | |
| name: 'Search', | |
| components: { |
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 App from './App.svelte' | |
| const app = new App({ | |
| target: document.body, | |
| }); | |
| export default app |
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 validateAndSend = () => { | |
| STATE.validationErrors = {} | |
| const formData = new FormData(document.forms.feedbackForm) | |
| const validationResult = validate(formData) | |
| if(validationResult.isValid){ | |
| trySendData(formData).then(data => { | |
| STATE.send = data; | |
| STATE.isSent = data.success; | |
| }) | |
| } else { |
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 class="col-md-4 col-sm-6" style="padding-left:0px;"> | |
| <h3 class="cont-title">Email Us</h3> | |
| <div class="contact-info"> | |
| <form action="" method="post" role="form" class="contactForm"> | |
| <div class="form-group"> | |
| <input type="text" name="name" class="form-control" id="name" placeholder="Your Name"> | |
| </div> | |
| <div class="form-group"> | |
| <input type="email" class="form-control" name="email" id="email" placeholder="Your Email"> | |
| </div> |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset='utf-8'> | |
| <meta name='viewport' content='width=device-width'> | |
| <title>Svelte app</title> | |
| <link rel='icon' type='image/png' href='/favicon.png'> | |
| <link rel='stylesheet' href='/global.css'> |
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 validateAndSend = () => { | |
| STATE.validationErrors = {} | |
| const formData = new FormData(document.forms.feedbackForm) | |
| const validationResult = validate(formData) | |
| // ... |