View 01-app.js
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
Vue.component('List', { | |
template: ` | |
<div class="list"> | |
<item v-for="name in names" v-bind:name="name" /> | |
</div> | |
`, | |
data: () => ({ | |
names: [ | |
'Ryan', | |
'Alexa', |
View 01-app.js
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
Vue.component('List', { | |
data: () => ({ | |
names: [ | |
'Ryan', | |
'Alexa', | |
'Jimmy' | |
] | |
}) | |
}) |
View RepeatableFields.js
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
const getRange = (start, end) => { | |
let list = [] | |
if (start <= end) { | |
for (let i = start; i <= end; i++) | |
list.push(i) | |
} | |
return list | |
} | |
const RepeatableField = (fields, prefix) => ({ |
View undottify.js
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
/* Input: | |
{ | |
"person.name.first": "Ryan", | |
"person.name.last": "Haskell-Glatz", | |
"person.age": 23 | |
} | |
... undottify magic ... | |
Output: | |
{ | |
"person": { |
View ScrollSpy.html
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> | |
<head> | |
<title>VueJS | Scrollspy</title> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
font-family: Arial; |
View Sluggify.Elm
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 Html exposing (..) | |
import Char | |
main = text <| sluggify "Sluggify's Example String!" | |
sluggify : String -> String | |
sluggify string = | |
string | |
|> removeSpecialCharacters |
View Lunch.elm
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 Html exposing (..) | |
import Html.Events exposing (..) | |
import Html.Attributes exposing (..) | |
import Random | |
main = | |
Html.program | |
{ init = init |
View SortableTable.elm
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 Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Html.App as App | |
type CellType | |
= String | |
| Int | |
| Bool |
View 10-markdown.elm
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 Html exposing (..) | |
import Html.App as Html | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput) | |
import String | |
import Markdown | |
main = | |
Html.beginnerProgram | |
{ model = model |
NewerOlder