Closed kristianmandrup closed 7 years ago
Hi @kristianmandrup
Can you try to simulate this on Codepen? I didn't get the error only by looking at the code here. Thanks.
Turned out the problem was a missing closing /
for the final <md-tabs>
ie. </md-tabs>
import Vue from 'vue'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'
import VueApollo from 'vue-apollo'
import Router from 'vue-router'
Vue.use(Router)
import apollo from '../apollo' // apollo client plugin for vue
import router from './router'
// https://www.npmjs.com/package/vue-awesome
import Icon from 'vue-awesome/components/Icon.vue'
import 'vue-awesome/icons/heart'
// Install the vue-apollo plugin and use the apollo client
Vue.use(VueApollo, {
apollo
})
// use vue-material: https://github.com/marcosmoura/vue-material
Vue.use(VueMaterial)
// Aplly themes
Vue.material.theme.register('default', {
primary: 'indigo',
accent: 'pink',
warn: 'deep-orange',
background: 'grey'
})
import App from './components/App/App.vue'
App.router = router
new Vue(App).$mount('#root')
And my App.vue
using the default theme. Still it doesn't display with any material styling.
Can you spot anything I'm missing?
PS: I'm using webpack 2.
Would be nice if you would include example of (or document) a webpack 1 & 2 configuration/setup.
<template>
<div v-md-theme="'default'">
<aheader />
<router-view />
<afooter />
</div>
</template>
I switched to using tabs with md-card
item instead of using dialogs (modals was used in original React app I used as the template)
My webpack 2 config
const config = {
entry: {
vue: path.resolve(__dirname, 'js', 'vue', 'app.js')
},
module: {
loaders: [
{
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.js$/
},
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.css$/,
loader: 'css-loader'
}
]
},
output: {
filename: '[name].app.js',
path: '/'
}
}
Hi @kristianmandrup
You can start the Webpack 2 config from the documentation website (still WIP)
I'm not going to add Webpack 2 or related in the documentation for now:
Unfortunately the early adoption of bleeding-edge-unreleased-new-tools can lead to problems like that and you should be aware that something can be broken. Try to ask on their Gitter. Sorry about that.
Thank you!
I'm having "huge" problems getting my material components working properly and find it very hard to debug
https://github.com/kristianmandrup/vue2-apollo-scaphold
My login tab looks as follows:
But it seems to be displayed even though the tab is not active. It's a mess! Any chance you could have a quick look?
Thanks.