Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin C. Halpin 27 posts 108 karma points
    Mar 11, 2018 @ 20:46
    Kevin C. Halpin
    0

    Integrate Vue.js with UmbracoCms in one project

    I would like to use Vue.js for the front-end and ASP.NET and Umbraco API controllers for the back-end. My question is just how to start to set the foundations of the project? Which packages to install first? Step by step would be very helpful. Thanks

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Mar 11, 2018 @ 21:00
    Anders Bjerner
    2

    Hi Kevin,

    Umbraco templates give you a clean slate, so you're free to choose your desired JS framework. As a result of this, there is no Umbraco-specific way to include Vue.js - or any other JS framework for that matter.

    You could load Vue.js simply by adding the following line to your (master) view:

    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    

    And then use a package like Axios to communicate with your API controllers:

    https://github.com/axios/axios

    Creating API controllers doesn't require any additional packages in Umbraco, so you should be good to go with your own code ;)

  • Connie DeCinko 95 posts 248 karma points
    Mar 01, 2019 @ 18:51
    Connie DeCinko
    0

    Are you aware of how to handle cross domain issues? Say my umbraco site is on a different domain or sub domain than my APIs?

Please Sign in or register to post replies

Write your reply to:

Draft