Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@symfony-javascript/vue-adapter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@symfony-javascript/vue-adapter

Regroups all the useful tools as a Vue plugin

unpublished
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Vue Adapter

This adapter allows handy usage of the Router and Translator packages in Vue.

Installation

$ npm install @symfony-javascript/vue-adapter @symfony-javascript/router @symfony-javascript/translator
$ yarn add @symfony-javascript/vue-adapter @symfony-javascript/router @symfony-javascript/translator

Usage

// main.js
import Vue from 'vue';
import { VueRouter, VueTranslator } from ' @symfony-javascript/vue-adapter';
import routes from './routes.json';
import messages from './messages.json';

// Register them
Vue.use(VueRouter, { data: routes });
Vue.use(VueTranslator, { data: messages });
<!-- Component.vue >> template -->
<a href="{{ $path('user_view', { id: user.id }) }}">{{ $_('navigation.user.show_profile', { '$user', user.display_name }) }}</a>
// Component.vue >> javascript
export default {
    props: {
        user: Object
    },

    mounted() {
        console.log(this.$_('console.greetings'));
    }
}

Keywords

symfony

FAQs

Package last updated on 07 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts