官术网_书友最值得收藏!

The quickest way to start using Vue2

In the last decade, a lot of the tools for web development have moved to the web, so let's go with the flow and start a new pen on http://codepen.io/.

You don't have to be a member of https://codepen.io/ to create pens there—you can just save them with the blanket username  Captain Anonymous . However, it's better to open an account so you have all your experiments in one plac e.

Once you navigate your browser to https://codepen.io, you'll be greeted with the following screen:

Click on the Create dropdown (in the main navigation, in the top-right area of the screen), and then click New Pen. Once you do, you will see the default editor setup:

Next, click the Settings button in the top right of the screen, and in the popup that appears choose JavaScript:

Next, in the Quick-add drop-down field, select the Vue option. Once you do, the first input will be filled out with the current minified version of Vue which is served from the Cloudflare CDN, or, more specifically, from this link: https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.13/vue.min.js.

That's it! We're ready to start using Vue2 in our Codepen project.

One thing to understand about Vue is that it makes our HTML dynamic. This is achieved by adding mustache syntax. This syntax is very easy to understand. We simply insert it inside an HTML element. For example, we can add mustache syntax to an h1 tag like this:

<h1>{{ heading1 }}</h1>

So, let's go over how this works in detail. Feel free to work on your own pen or see the example here: https://codepen.io/AjdinImsirovic/pen/rKYyvE.

主站蜘蛛池模板: 姚安县| 台江县| 长宁区| 盐源县| 昌邑市| 双流县| 马山县| 平陆县| 和平区| 和平县| 泰安市| 惠东县| 哈尔滨市| 沂南县| 阜新| 如皋市| 乌兰察布市| 吉隆县| 永昌县| 定日县| 股票| 辽阳市| 电白县| 青田县| 巨鹿县| 黑龙江省| 阳朔县| 北京市| 房产| 东莞市| 延吉市| 新巴尔虎右旗| 大丰市| 淮北市| 军事| 昭苏县| 宜章县| 巴青县| 通化县| 讷河市| 乌审旗|