Skip to content

Instantly share code, notes, and snippets.

View kraizt's full-sized avatar
:octocat:
keep calm, keep learning.

Adimas Lutfi kraizt

:octocat:
keep calm, keep learning.
  • Yogyakarta
View GitHub Profile
<html>
<head>
<title>Hello Vue</title>
</head>
<body>
<div id="app">
<textarea v-model="message"></textarea>
<pre>
{{ $data }}
</pre>
<html>
<head>
<title>Hello Vue</title>
</head>
<body>
<div id="app">
<textarea></textearea>
</div>
</body>
// js
// html
<html>
<head>
<title>Hello jQuery my old friend</title>
</head>
<body>
<h1>Hello from darkness</h1>
<input id=”message”>
</body>
// html
<div id=”app”>
<h1>{{ message }}</h1>
<input v-model=”message”>
</div>
//js
<script>
new Vue({
el: ‘#app’,
// html
<div id=”app”>
{{ message }}
</div>
// js letakkan pada <script></script>
<script>
var app = new Vue({
el: ‘#app’,
data: {
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8">
<title>Intro vue</title>
<link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity=”sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ” crossorigin=”anonymous”>
</head>
<body>
<div class=”container”>
// your vue dom goes here soon
<?php
$users = [
[
'id' => 1,
'name' => 'Adimas Lutfi Wicaksono',
'gender' => 1,
],
[
'id' => 2,
<?php
$users = ['Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto'];
$users_new = 'Ricky Andika Putra';
array_unshift($users, $users_new);
print_r($users);
<?php
$users = ['Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto'];
$users_new = 'Ricky Andika Putra';
// pake unsift masuknya ke awal, pake push kok jadi integer, aneh :|
array_push($users, $users_new);
print_r($users);
<?php
$users = [
[
'id' => 1,
'name' => 'Adimas Lutfi Wicaksono',
],
[
'id' => 2,
'name' => 'Salman Alfarisi',