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
devServer: { | |
proxy: { | |
'*': { | |
target: 'http://localhost:5001', | |
changeOrigin: true | |
} | |
} | |
}, |
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
if (process.env.NODE_ENV === 'production') { | |
module.exports.devtool = '#source-map' | |
// http://vue-loader.vuejs.org/en/workflow/production.html | |
module.exports.plugins = (module.exports.plugins || []).concat([ | |
new webpack.DefinePlugin({ | |
'process.env': { | |
NODE_ENV: '"production"' | |
} | |
}), | |
new webpack.optimize.UglifyJsPlugin({ |
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
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
ViewBag.Message = "Message from Controller"; | |
return View(); | |
} | |
} |
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
@using System.Web.Optimization | |
@{ | |
ViewBag.Title = "Home Page"; | |
} | |
<div id="app"> | |
<h3>@ViewBag.Message</h3> | |
{{ vueMessage }} | |
</div> |
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="time"> | |
{{ time }} | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
time: { | |
type: Object, |
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 FirstComponent from './FirstComponent.vue' | |
... | |
el: '#app', | |
components: { | |
FirstComponent | |
}, |
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"> | |
<h3>@ViewBag.Message</h3> | |
{{ vueMessage }} | |
<first-component v-bind:time="new Date()"></first-component> | |
</div> |
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
var path = require('path') | |
var webpack = require('webpack') | |
var fs = require('fs') | |
var appBasePath = './Scripts/app/' | |
var jsEntries = {} | |
// We search for index.js files inside basePath folder and make those as entries | |
fs.readdirSync(appBasePath).forEach(function (name) { | |
var indexFile = appBasePath + name + '/index.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
import Vue from 'vue' | |
import FirstComponent from './FirstComponent.vue' | |
import {SweetModal, SweetModalTab} from 'sweet-modal-vue' | |
new Vue({ | |
el: '#app', | |
components: { | |
FirstComponent, | |
SweetModal, | |
SweetModalTab |
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" class="row"> | |
<div class="text-center"> | |
<button class="btn btn-primary" v-on:click="toggleModal">Show modal!</button> | |
<sweet-modal ref="modal"> | |
<h3>@ViewBag.Message</h3> | |
</sweet-modal> | |
</div> | |
</div> |