Angular记录(4)
文档资料
- 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions
箭头函数--ES6文档:http://es6.ruanyifeng.com/#docs/function#箭头函数
- Promise 对象--JS教程:https://wangdoc.com/javascript/async/promise.html
- Promise--ES6文档:http://es6.ruanyifeng.com/#docs/promise
- Promise--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise
Promise.prototype.then()--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise/then
- 教程:英雄指南:https://www.angular.cn/tutorial#tutorial-tour-of-heroes
- 工作区与项目文件的结构:https://www.angular.cn/guide/file-structure
- 组件简介:https://www.angular.cn/guide/architecture-components
CLI 命令参考手册:https://www.angular.cn/cli
英雄编辑器
英雄编辑器:https://www.angular.cn/tutorial/toh-pt1#the-hero-editor
应用程序现在有了基本的标题。 接下来你要创建一个新的组件来显示英雄信息并且把这个组件放到应用程序的外壳里去。
创建英雄列表组件
使用 Angular CLI 创建一个名为 heroes 的新组件。
ng generate component heroes
CLI 创建了一个新的文件夹 src/app/heroes/,并生成了 HeroesComponent 的三个文件。
WS提供了工具



生成的文件

*.component.spec.ts是测试用的

添加 hero 属性


显示英雄


显示 HeroesComponent 视图


创建 Hero 类


页面显示变得不正常了,因为你刚刚把 hero 从字符串改成了对象。

显示 hero 对象


编辑英雄名字


AppModule




Angular记录(4)的更多相关文章
- Angular记录(2)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(11)
开始使用Angular写页面 使用WebStorm:版本2018.3.5 官网资料 资料大部分有中文翻译,很不错 速查表:https://www.angular.cn/guide/cheatsheet ...
- Angular记录(10)
文档资料 速查表:https://www.angular.cn/guide/cheatsheet 风格指南:https://www.angular.cn/guide/styleguide Angula ...
- Angular记录(9)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(8)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(7)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(6)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(5)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
- Angular记录(3)
文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...
随机推荐
- iOS:我的学习路径
1.复习C语言(半个月) <C Primer Plus>1-6章 2.学习Objective-C基础语法(一周) 黑马程序员视频 3.直接用Xcode开始APP的实战(半个月) 黑马程序员 ...
- Node.js安装及环境配置之Windows篇---完美,win7已测
一.安装环境 1.本机系统:Windows 10 Pro(64位) (楼主win7,完美通过)2.Node.js:v6.9.2LTS(64位) (楼主版本2018-11-01下载的最新版本) 二.安装 ...
- Redis 主从复制原理及雪崩 穿透问题
定义: Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工作由VMw ...
- Microsoft Deployment Toolkit build 8456
MDT build 8456的重大变化摘要. 支持的配置更新 Windows ADK for Windows 10,版本1809 Windows 10,版本1809 Configuration Man ...
- 【shell基础】数学计算
#!/bin/bash #4.4.sh s= #定义一个求和变量,初值为0. t=`**$` #用expr改变运算顺序,求x的y次方. t=$[t*] #t乘以3. s=$[s+t] #结果相加. t ...
- timers模块
timers模块 var timers = require('timers'); function A() { //将A对象注册到定时器里 timers.enroll(); //进行激活,如果不激活, ...
- Linux基础学习:文件与目录管理
目录与路径 目录的相关操作 几个特殊的目录: . :表示当前目录 .. :表示上一层目录 - :表示前一个工作目录 ~ :表示当前用户所在的主文件夹 ~account :表示account用户所在的主 ...
- 编译装php7.2 && nginx-1.14
环境准备 # cat /etc/centos-release CentOS Linux release 7.6.1810 (Core) # uname -r 3.10.0-957.el7.x86_64 ...
- 程序员如何避免996、icu?欢迎来讨论一下。
最近996icu火了,我以前就被996害了.现在还没缓过来,可能是自己体质比较弱吧. 以前的事就不说了,说说现在的想法吧.那么程序员如何才能避免996icu呢? 有两个基本因素: 1. 实现一个功能, ...
- MacOS10.14下Eclipse安装lombok
按照网上的教程来做,会导致eclipse启动不了,这里记录一下解决方案: 一.复制lombok.jar到../Eclipse/下 二.修改eclipse.ini,在末尾追加: -Xbootclassp ...