[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 ...
随机推荐
- UITextView -- 基础备忘
UITextView 这篇文章只涉及到基本的使用,日后会写一些关于结合TextKit的备忘 基本属性 let screenSize = UIScreen.mainScreen().bounds.siz ...
- iOS 9 适配
一.iOS9 bitcode首先最大的问题就是坑货xcode7,xcode7默认是打开bitcode的,bitcode是苹果为了解决他自己以后的应用可以随意更换硬件的处理做的准备也就是arm指令集和x ...
- android SurfaceView绘制 重新学习--基础绘制
自从大二写了个android游戏去参加比赛,之后就一直写应用,一直没用过SurfaceView了,现在进入了游戏公司,准备从基础开始重新快速的学一下这个,然后再去研究openGL和游戏引擎. 直接上代 ...
- jQuery预加载插件
插件描述:jQuery Fadeloader的插件可以让你轻松实现预加载到您的网站或部分使用级联渐显效果来显示特定的内容块(例如,头> MENU>内容>页脚) jQuery Fa ...
- Stanford Parser学习入门(2)-命令行运行
在Stanford parser目录中已经定义了一部分命令行工具以及图形界面,本文将介绍如何在windows使用这些工具进行语法分析,Linux下也有shell可以使用. 关于如何搭建环境请参考上一篇 ...
- phpStorm 使用技巧大集合
之前整理了一部分使用技巧了,但是在实际操作中发现phpstorm的技巧实在是太多了,所以大部分都统一整理到这篇文字中 ,备用 插件1 1:phpstrom的插件Provides live edit H ...
- PYTHON--CLASS
class Robot: population = 0 def __init__(self, name): self.name = name print("(Initializing {0} ...
- HTML标签与表格
1.打开DREAMWEAVER,新建HTML,如下图: 2.body的属性: bgcolor 页面背景色 background 背景壁纸.图片 text 文字颜色 topmargin 上边 ...
- POJ_3662_Telephone_Lines_(二分+最短路)
描述 http://poj.org/problem?id=3662 给一张图,要将1与n连起来.可以有k条边免费,其他边自费,付费的值为所有自费边中最大的值.求最小付费. Telephone Line ...
- CF -- 414A
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int mai ...