- KnockoutJS Essentials
- Jorge Ferrando
- 211字
- 2021-07-23 20:16:15
Installing components
To develop our real-world project, we need to install a few components and set up our first layout.
These are all the components you need to download:
Since we just work on the client side in the first chapters, we can mock data in the client and will not need a server side for now. So we can choose any place in our computer to start our project. I recommend you use the environment you usually employ to do your projects.
To start, we create a folder called ko-cart
and then create three folders and a file inside it:
- In the
css
folder, we will put all our css. - In the
js
folder, we will put all our JavaScript. - In the
fonts
folder, we will put all the font files needed by the Twitter Bootstrap framework. - Create an
index.html
file.
Now you should set up your files the same way as shown in the following screenshot:

The initial folder structure
Then we should set the content of the index.html
file. Remember to set all the links to the files we will need using the <script>
and <link>
tags:
<!DOCTYPE html> <html> <head> <title>KO Shopping Cart</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> </head> <body> <script type="text/javascript" src="js/vendors/jquery.min.js"> </script> <script type="text/javascript" src="js/vendors/bootstrap.min.js"> </script> <script type="text/javascript" src="js/vendors/knockout.debug.js"> </script> </body> </html>
With these lines of code, we have all we need to start our application.
- 深入核心的敏捷開(kāi)發(fā):ThoughtWorks五大關(guān)鍵實(shí)踐
- Web前端開(kāi)發(fā)技術(shù):HTML、CSS、JavaScript(第3版)
- Ext JS Data-driven Application Design
- Android 7編程入門經(jīng)典:使用Android Studio 2(第4版)
- 精通API架構(gòu):設(shè)計(jì)、運(yùn)維與演進(jìn)
- 琢石成器:Windows環(huán)境下32位匯編語(yǔ)言程序設(shè)計(jì)
- Mastering Apache Maven 3
- Python爬蟲(chóng)、數(shù)據(jù)分析與可視化:工具詳解與案例實(shí)戰(zhàn)
- Arduino電子設(shè)計(jì)實(shí)戰(zhàn)指南:零基礎(chǔ)篇
- TypeScript圖形渲染實(shí)戰(zhàn):2D架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)
- SAP Web Dynpro for ABAP開(kāi)發(fā)技術(shù)詳解:基礎(chǔ)應(yīng)用
- 高質(zhì)量程序設(shè)計(jì)指南:C++/C語(yǔ)言
- 讀故事學(xué)編程:Python王國(guó)歷險(xiǎn)記
- 從零開(kāi)始學(xué)UI設(shè)計(jì)·基礎(chǔ)篇
- WCF編程(第2版)