[Angular 2] 8. Better ES5 Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://code.angularjs.org/2.0.0-alpha.28/angular2.sfx.dev.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body> <egghead></egghead>
<script src="app.js"></script>
</body>
</html>
var Note = angular
.Component({
selector: 'note'
})
.View({
template: '<h3>World</h3>'
})
.Class({
constructor: function() { }
}); var Egghead = angular
.Component({
selector: 'egghead'
})
.View({
template: '<div><h1>Hello</h1><note></note></div>',
directives: [Note]
})
.Class({
constructor: function() { }
}); document.addEventListener("DOMContentLoaded", function() {
angular.bootstrap(Egghead);
});
[Angular 2] 8. Better ES5 Code的更多相关文章
- [转]Using Angular in Visual Studio Code
本文转自:https://code.visualstudio.com/docs/nodejs/angular-tutorial Using Angular in Visual Studio Code ...
- [转]VS Code 扩展 Angular 6 Snippets - TypeScript, Html, Angular Material, ngRx, RxJS & Flex Layout
本文转自:https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode VSCode Angular Typ ...
- 来自 Thoughtram 的 Angular 2 系列资料
Angular 2 已经正式 Release 了,Thoughtram 已经发布了一系列的文档,对 Angular 2 的各个方面进行深入的阐释和说明. 我计划逐渐将这个系列翻译出来,以便对大家学习 ...
- [Angular 2] Understanding @Injectable
In order to resolve a dependency, Angular’s DI uses type annotations. To make sure these types are p ...
- 深入理解jQuery、Angular、node中的Promise
最初遇到Promise是在jQuery中,在jQuery1.5版本中引入了Deferred Object,这个异步队列模块用于实现异步任务和回调函数的解耦.为ajax模块.队列模块.ready事件提供 ...
- Nodejs之MEAN栈开发(六)---- 用Angular创建单页应用(上)
在上一节中我们学会了如何在页面中添加一个组件以及一些基本的Angular知识,而这一节将用Angular来创建一个单页应用(SPA).这意味着,取代我们之前用Express在服务端运行整个网站逻辑的方 ...
- part 2 Angular modules and controllers
What is a module in AngularJS? A module is a container for different parts of your application i.e c ...
- angular之scope.$watch
某“大神”挖了个陨石坑,我于是乎似懂非懂的接手,玩了一个月angular.现在项目告一段落,暂别了繁重的重复性工作,可以开始回顾.认真的折腾下之前犹抱琵琶的angular. angular吸引人的特性 ...
- [转]Angular: Hide Navbar Menu from Login page
本文转自:https://loiane.com/2017/08/angular-hide-navbar-login-page/ In this article we will learn two ap ...
随机推荐
- Entity FrameWork知识点汇总
这里罗列的并非EF的所有知识点 ,只是我在开发过程中遇到或者使用到的知识,记录于此, 备忘 1:EF的三种创建方式 A:Database First B:Model First C:Code Firs ...
- Linq 筛选出一条数据
InBoxInfo boxInfo = boxList.Find(p => p.GoodsID == goods.GoodsID.ToString().Trim() && p.S ...
- ASP.NET Web API 2 入门(一)
前言 HTTP 不是只是为了服务的 web 页.这也是建设公开服务和数据的 Api 的强大平台.HTTP 是简单的. 灵活的和无处不在.你能想到的几乎任何平台有 HTTP 库,因此,HTTP 服务可以 ...
- git支持中文
以前使用git,都要参考这个来进行中文支持 http://blog.csdn.net/son_of_god/article/details/7341928 有一次更新了git之后,发现默认支持了中文[ ...
- Eclipse中添加android sdk javadoc和source
在 javadoc location path中添加file:/D:/Android_SDK/sdk/docs/reference/ 在 source attachment中添加为 Externa ...
- 利用if else来运行咱们结婚吧
static void Main(string[] args) { while (true) { string ...
- bzoj1264
表面上看这是一道LCS问题 LCS问题O(n2)的复杂度已经很优秀了 而这道题需要O(nlogn)以下的复杂度才能AC 所以我们要找经典问题的特殊性 特殊就在这两个串中,每个数字都是恰好出现5次 不难 ...
- 安装PyQt
下载PyQt(版本一定要对) http://www.riverbankcomputing.com/software/pyqt/download import sys,urllib2 from HTML ...
- An exception occurred during configuration of persistence layer.
配置文件放在bin文件夹下(注意:hibernate.cfg.xml文件名不要随便改动)
- 使用VisualStudio进行单元测试之二
借着工作忙的借口,偷了两天懒,今天继续单元测试之旅.前面说了如何进行一个最简单的单元测试,这次呢就跟大家一起来熟悉一下,在visual studio中如何进行数据驱动的单元测试. 开始之前先来明确一下 ...