Git Product home page Git Product logo

Comments (2)

ryanelian avatar ryanelian commented on June 17, 2024 1

Hi, try using this tool: https://github.com/ryanelian/instapack

ipack new vue

You should now be able to import LINQ from the Vue code (for example in MyLINQ.vue)

<template>
    <div>
        <p>{{x}}</p>
    </div>
</template>

<script lang="ts">
import Vue from 'vue';
import Component from 'vue-class-component';
import Enumerable from 'linq';

@Component({})
export default class MyLINQ extends Vue {
    x: number = Enumerable.from([1, 2, 3]).sum();
}
</script>

As usual, then you'd want to register the component (in vue-project.ts which is imported from index.ts entry point). You know, the usual Vue stuff:

import Vue from 'vue';
import MyLINQ from './components/MyLINQ.vue';

Vue.component('my-linq', MyLINQ);
new Vue().$mount('#app');

When done, simply use the component in your app. Also the usual Vue stuff:

<div id="app">
  <my-linq></my-linq>
</div>

then build: ipack (production) or ipack -dw (dev+watch mode) or ipack -h (hot reload mode)

then reference the built script on your html:

<link rel="stylesheet" href="wwwroot/css/ipack.css" />

<script src="wwwroot/js/ipack.dll.js"></script>
<script src="wwwroot/js/ipack.js"></script>

from linq.

mihaifm avatar mihaifm commented on June 17, 2024

Hi, I don't have any experience with Vue, you have a better chance of getting help if you ask this on Stackoverflow.

Make sure to better describe your use case and provide code samples.

from linq.

Related Issues (20)

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.