Giter VIP home page Giter VIP logo

vue-2.0-simple-routing-example's People

Contributors

chrisvfritz avatar tkoma212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-2.0-simple-routing-example's Issues

throw error

when I exuc

npm run build

throw a error

ERROR in build.js from UglifyJs
SyntaxError: Unexpected token: name (Vue) [./src/main.js:1,7]

Context not available inside Vue component

To really get the most out of Page.js, it seems like we'd need the context within the Vue component itself. What's a good way to do this?

My best attempt so far is:
(src/main.js)
line 10: render (h) { return h(this.ViewComponent, { props: { context:this.context} }) }
line 15: page(route, (ctx) => { app.context = ctx; app.ViewComponent = Component })

(src/pages/Home.vue)
add before line 11: props: [ 'context' ]
(repeat for each page)

Not sure if this is a good practice or not, but it seems to work.

Not working

I set up the local instance as mentioned in the doc. But its not working at all. It doesn't through up any error in the console as well.

Question: how serve a build

After npm run build this is what's in the dist folder:

-a----       20-12-2016     13:24          58065 build.js
-a----       20-12-2016     13:24         475164 build.js.map

How do I serve this?

When I run "npm install" I got this

npm WARN deprecated [email protected]: We're super 😸 excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets 😭 , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users 😎 ! Also, we are in the process of releasing v7, so give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and test it! Thanks so much for using Babel 🙏 , please give us a follow @babeljs for updates, join slack.babeljs.io for discussion and help support at opencollective.com/babel

npm run dev throws error

I run npm install
now running npm run dev but i get an error
The npm-debug.log reads:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.4.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle vue-2.0-simple-routing-example@~predev: vue-2.0-simple-routing-example@
6 silly lifecycle vue-2.0-simple-routing-example@~predev: no script for predev, continuing
7 info lifecycle vue-2.0-simple-routing-example@~dev: vue-2.0-simple-routing-example@
8 verbose lifecycle vue-2.0-simple-routing-example@~dev: unsafe-perm in lifecycle true
9 verbose lifecycle vue-2.0-simple-routing-example@~dev: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/mikeconnor/Documents/git repos/vue-2.0-simple-routing-example/node_modules/.bin:/usr/local/sbin:/usr/local/sbin:/Users/mikeconnor/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/mikeconnor/.rvm/bin
10 verbose lifecycle vue-2.0-simple-routing-example@~dev: CWD: /Users/mikeconnor/Documents/git repos/vue-2.0-simple-routing-example
11 silly lifecycle vue-2.0-simple-routing-example@~dev: Args: [ '-c', 'webpack-dev-server --inline --hot' ]
12 silly lifecycle vue-2.0-simple-routing-example@~dev: Returned: code: 1 signal: null
13 info lifecycle vue-2.0-simple-routing-example@~dev: Failed to exec dev script
14 verbose stack Error: vue-2.0-simple-routing-example@ dev: webpack-dev-server --inline --hot
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:885:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid vue-2.0-simple-routing-example@
16 verbose cwd /Users/mikeconnor/Documents/git repos/vue-2.0-simple-routing-example
17 error Darwin 16.3.0
18 error argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "run" "dev"
19 error node v7.4.0
20 error npm v4.1.1
21 error code ELIFECYCLE
22 error vue-2.0-simple-routing-example@ dev: webpack-dev-server --inline --hot
22 error Exit status 1
23 error Failed at the vue-2.0-simple-routing-example@ dev script 'webpack-dev-server --inline --hot'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the vue-2.0-simple-routing-example package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack-dev-server --inline --hot
23 error You can get information on how to open an issue for this project with:
23 error npm bugs vue-2.0-simple-routing-example
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls vue-2.0-simple-routing-example
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Mikes-MacBook:vue-2.0-simple-routing-example mikeconnor$

Q: Scroll position & keep alive

Hey, thank you for this bare-bones setup.

I was wondering if you've ever thought about Scroll position & keep alive.

I cloned this repo and added more content to each page and I've make the header fixed with CSS.

It looks like when I click on a link the new page loads, but the scroll is maintained, but the default behavior should be to load the new page with scroll position at zero.

I will do more research in the weekend for this, but I would like to know if you already have any insights about scroll position and keep-alive without the vuerouter and if you are willing to share with us.

Thank you,
Adrian

Request: history update

Hi, nice work. One issue:
Watching browser history in Chrome all entries are pointing to the home url. This isn't a reflection of the reality. What can I (or you?) do to make that right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.