-
npm install -g @aws-amplify/cli
-
amplify configure
-
npm i aws-amplify
-
npm i aws-amplify-vue
-
amplify init
-
amplify add hosting
-
amplify publish
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>My Test App</title> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> |
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
//Program With Erik | |
const games = ['legend', 'pokemon', 'fortnite', 'blah'] | |
games.forEach(val=> { | |
if(val === 'legend'){ | |
console.log('legends') | |
} else if(val === 'pokemon') { |
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 Vue from 'vue'; | |
import { plugin } from 'vue-function-api'; | |
import { value } from 'vue-function-api'; | |
Vue.use(plugin); | |
export const counter = value(0); | |
export const image = value(''); | |
export const pressMe = () => { |
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
<template> | |
<div class="home"> | |
<h1>Random Dog Images</h1> | |
<h2>Dog Count {{counter}}</h2> | |
<button @click="getDog">Get Dogs</button> | |
<div class="dog-wrapper"> | |
<div class="picture-dog"> | |
<img :src="image" alt /> | |
</div> | |
<button v-on:click="pressMe">Increment Dog Count</button> |
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
<div id="app"></div> | |
<script src="vue.global.js"></script> | |
<script> | |
const MyComponent = { | |
data: { | |
name: 'Erik' | |
}, | |
template: `<h1>{{ name }}</h1>` | |
} |
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
<body> | |
<div id="app"> | |
<div class="nes-container with-title is-centered"> | |
<p class="title">Vue Form Test</p> | |
<form @submit.prevent="submit"> | |
<div class="nes-field"> | |
<label for="name_field">Character Name</label> | |
<input placeholder="Enter name here" type="text" | |
name="name" | |
id="name_field" class="nes-input" /> |
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
<script setup> | |
import { watchEffect, ref, computed, watch } from "vue"; | |
import { useRoute } from "vue-router"; | |
const route = useRoute(); | |
const welcome = ref("Hello!"); | |
const count = ref(0); | |
const count2 = ref(0); | |
// Writes to a pre tag (Like console.log) | |
const write = ref(""); |
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
<script setup lang="ts"> | |
import { ref, useSlots, getCurrentInstance } from "vue"; | |
const props = defineProps<{ url: string }>(); | |
const slots = useSlots(); | |
let res = ref(""); | |
let loading = ref(true); | |
fetch(props.url) |