鲍勃の部屋
  • Blog
  • Work
  • About
  • Contact

angularJS 如何通过 validator.w3.org 验证

7/30/2014

0 Comments

 
答案是通过增加 data- 前缀,见例子


<!DOCTYPE html>
<html data-ng-app>
<head>
<meta charset="utf-8"/>

<title>This is first webpage</title>
</head>

<body>
Temperature: <input data-ng-model="temp" />
<p data-ng-show="temp>=17">Not too bad</p>
<p data-ng-show="temp<17">A little chilly {{temp}}</p>


<script src="angular.min.js"></script>

</body>
</html>
注一:只有 ng-app 没有np-controller
注二: ng_show 的条件显示用法

收工
0 Comments

Win7 开热点

7/16/2014

0 Comments

 

1. run cmd as admin $:
netsh wlan set hostednetwork mode=allow ssid=bob key=bobWiFi 

2. Control Panel -> Network and Internet -> Manage Wireless Networks -> Adapter proterties -> Sharing -> Check 2 options && select connection (Wireless Network connection)

3. $:
netsh wlan start hostednetwork



0 Comments

Express 之Hello world -- 第1课

7/3/2014

0 Comments

 
    Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.


官网地址

下面我们开始 express 的 hello world 之旅 (确保你已经安装了nodeJS哟 )

第一步,任意随意创建一个目录,比如叫 hello-express 

然后新建一个文件叫 package.json   (express 的版本号可通过 npm info express version 获取)
{
  "name": "hello-express",
  "description": "hello world test app",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": "4.4.5"
  }
}

Read More
0 Comments

AngularJS 学习笔记 4

7/3/2014

0 Comments

 
这次学习angularJS的一个很重要的知识点---- Directives.
假设现在要实现一个购物车显示与编辑功能。
默认的,没有使用angularJS之前的纯 html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >

<script >

</script>
</head>
<body>

<h1>Your Shopping Cart</h1>

<div>
<label>Name: </label> <label>数量: </label><label>Price</label> <label>Total</label> <label>删除</label>
</div>

<div>
<label>Cat</label><input size="3" /><label>1.00</label> <label>10.00</label><button>Remove</button>
</div>

<div>
<label>Dog</label><input size="3" /><label>2.50</label> <label>10.00</label><button>Remove</button>
</div>

<div>
<label>Pig</label><input size="3" /><label>29.0</label> <label>261.0</label><button>Remove</button>
</div>

</body>
</html>

Read More
0 Comments

    Author

    鲍勃 (上海)
    互联网码农

    小A

    Archives

    July 2014
    June 2014
    May 2014

    Categories

    All
    AngularJS
    App
    Bootstrap
    Cocos2dx-c++
    Css
    CSS3
    Design Pattern
    Express
    Funny
    Game
    Html5
    Jasmine
    Javascript
    Lua
    Music
    Node.js
    Pattern
    Phonegap
    Php
    Python
    Tdd
    Tips

    RSS Feed

Powered by Create your own unique website with customizable templates.