惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Secure Thoughts
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
The Blog of Author Tim Ferriss
B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
Arctic Wolf
T
The Exploit Database - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
AWS News Blog
AWS News Blog
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
Google Online Security Blog
Google Online Security Blog
T
Troy Hunt's Blog
I
InfoQ
L
LINUX DO - 热门话题
WordPress大学
WordPress大学
C
Cisco Blogs
G
GRAHAM CLULEY
The Register - Security
The Register - Security
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Schneier on Security
Schneier on Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
H
Hacker News: Front Page
小众软件
小众软件
雷峰网
雷峰网
The Hacker News
The Hacker News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Tor Project blog
博客园 - 聂微东
N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
The GitHub Blog
The GitHub Blog
腾讯CDC
P
Palo Alto Networks Blog
Scott Helme
Scott Helme

博客园 - Adam.Zhao

简单示例理解神闭包 ejs 模板使用方法 我使用的开源组件汇总,以备学习使用 了不起的Node.js--之五 TCP连接 Windows7下Java运行时环境搭建 了不起的Node.js--之四 了不起的Node.js--之三 了不起的Node.js--之二 了不起的Node.js--之一 请大家有需要购物的到我的网站上吧。 最近在研究google的angularjs 好久没有来写博客了 c#二进制文件数据转换base64字符串文本代码 ActionFilterAttribute做切面编程的Url的格式化例子 学习content-type 网站性能优化之服务端(一) 艺龙旅行网招聘了 关于项目管理的几点建议 HP CQ35 Windows7声卡驱动安装不上问题
AngularJS应用骨架
Adam.Zhao · 2013-12-13 · via 博客园 - Adam.Zhao

调用Angular

为了使用Angular,所有应用都必须首先做两件事情:

1、加载angular.js库。

2、使用ng-app指令告诉angular应该管理DOM中得哪一部分。

加载脚本

加载类库的操作非常简单,与其他Javascript类库遵循同样的规则。你可以从Google的内容分发网络(CDN)中加载类库,示例如下:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>

 我们推荐你使用google的CDN,google的服务器非常快,并且可以在多个应用之间缓存脚本库。也就是说,

如果你得用户偶多款应用使用Angular,类库只要下载一次就可以了。同时,如果用户访问了其他站点,

而该站点使用了Google得CDN链接来获取Angular库,那么用户在访问你得站点时,就不需要再次下载Angular库了。

使用ng-app声明Angular的边界

你可以使用ng-app指令告诉Angular应该管理页面中得哪一块。如果你正在构建一款纯Angular应用,

那么你应该把ng-app指令写在<html>标签中,示例如下:

<html>
    ...
    <div ng-app>
    </div>
    ...
</html>