<!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的更多相关文章

  1. [转]Using Angular in Visual Studio Code

    本文转自:https://code.visualstudio.com/docs/nodejs/angular-tutorial Using Angular in Visual Studio Code ...

  2. [转]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 ...

  3. 来自 Thoughtram 的 Angular 2 系列资料

    Angular 2 已经正式 Release 了,Thoughtram 已经发布了一系列的文档,对 Angular 2 的各个方面进行深入的阐释和说明. 我计划逐渐将这个系列翻译出来,以便对大家学习 ...

  4. [Angular 2] Understanding @Injectable

    In order to resolve a dependency, Angular’s DI uses type annotations. To make sure these types are p ...

  5. 深入理解jQuery、Angular、node中的Promise

    最初遇到Promise是在jQuery中,在jQuery1.5版本中引入了Deferred Object,这个异步队列模块用于实现异步任务和回调函数的解耦.为ajax模块.队列模块.ready事件提供 ...

  6. Nodejs之MEAN栈开发(六)---- 用Angular创建单页应用(上)

    在上一节中我们学会了如何在页面中添加一个组件以及一些基本的Angular知识,而这一节将用Angular来创建一个单页应用(SPA).这意味着,取代我们之前用Express在服务端运行整个网站逻辑的方 ...

  7. 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 ...

  8. angular之scope.$watch

    某“大神”挖了个陨石坑,我于是乎似懂非懂的接手,玩了一个月angular.现在项目告一段落,暂别了繁重的重复性工作,可以开始回顾.认真的折腾下之前犹抱琵琶的angular. angular吸引人的特性 ...

  9. [转]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 ...

随机推荐

  1. Html DOM 常用属性和方法

    Node对象的节点类型***************************************************接口 nodeType常量 nodeType值 备注Element Node ...

  2. OpenIOC

    http://wenku.it168.com/d_926300.shtml OpenIOC http://safe.it168.com/a2015/1208/1790/000001790446.sht ...

  3. 【BZOJ 2154】Crash的数字表格 (莫比乌斯+分块)

    2154: Crash的数字表格 Description 今天的数学课上,Crash小朋友学习了最小公倍数(Least Common Multiple).对于两个正整数a和b,LCM(a, b)表示能 ...

  4. dynamic 使用

    dynamic a = , B = }; Console.WriteLine("a.A=" + a.A); dynamic b = new Dictionary<string ...

  5. leetcode面试准备:Lowest Common Ancestor of a Binary Search Tree & Binary Tree

    leetcode面试准备:Lowest Common Ancestor of a Binary Search Tree & Binary Tree 1 题目 Binary Search Tre ...

  6. 【HDOJ】1512 Monkey King

    左偏树+并查集.左偏树就是可合并二叉堆. /* 1512 */ #include <iostream> #include <string> #include <map&g ...

  7. cocos2d-x 使用UIWebView加载网页(顺便可以看到如何用OC调C++)

    猴子原创,欢迎转载.转载请注明: 转载自Cocos2D开发网–Cocos2Dev.com,谢谢! 原文地址: http://www.cocos2dev.com/?p=248 前段时间项目中要微博授权登 ...

  8. C#数据库连接字符串

    转自:http://blog.csdn.net/xiaokexinger/article/details/1541441 在MSDN中,.net的数据库连接字符串都有详细的说明,我这里以代码范例的方式 ...

  9. 执行一条cmd命令的window.bat 批处理代码:

    . .执行一条cmd命令的window.bat 批处理代码: @echo off echo NodeJS SUPERVISOR...Server.js ::下面是批处理代码 supervisor d: ...

  10. linux vi快捷键大全

    h或^h 向左移一个字符 j或^j或^n 向下移一行 k或^p 向上移一行 l或空格 向右移一个字符 G 移到文件的最后一行 nG 移到文件的第n行 w 移到下一个字的开头 W 移到下一个字的开头,忽 ...