文档资料

英雄编辑器

英雄编辑器: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)的更多相关文章

  1. Angular记录(2)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  2. Angular记录(11)

    开始使用Angular写页面 使用WebStorm:版本2018.3.5 官网资料 资料大部分有中文翻译,很不错 速查表:https://www.angular.cn/guide/cheatsheet ...

  3. Angular记录(10)

    文档资料 速查表:https://www.angular.cn/guide/cheatsheet 风格指南:https://www.angular.cn/guide/styleguide Angula ...

  4. Angular记录(9)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  5. Angular记录(8)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  6. Angular记录(7)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  7. Angular记录(6)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  8. Angular记录(5)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

  9. Angular记录(3)

    文档资料 箭头函数--MDN:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_fun ...

随机推荐

  1. Linux - 微软无线鼠标滚动过快问题

    Linux - 微软无线鼠标滚动过快问题 使用了一段时间的 Manjaro , 感觉相当不错, 但有一个蛋疼的地方就是每次滚动鼠标滚轮, 都会切换一页以上的页面, 总是有一部分看不到. 之前以为是 L ...

  2. timers模块

    timers模块 var timers = require('timers'); function A() { //将A对象注册到定时器里 timers.enroll(); //进行激活,如果不激活, ...

  3. 001_Go hello world

    一.go获取程序参数及指针地址示例 package main import ( "fmt" "os" ) func main() { fmt.Println(o ...

  4. 关于使用nodejs的mysql查询时碰到的坑

    今天在编写登录模块时,碰到一个隐蔽的坑,故记录一番 在使用Node.js的mysql模块的query方法时,查询语句使用了 `select password from login where name ...

  5. 02-Django框架介绍

    02-Django框架介绍 1.MVC框架介绍 MVC 是一种使用 MVC(Model View Controller 模型-视图-控制器)设计创建 Web 应用程序的模式 具有耦合性低.重用性高.生 ...

  6. springboot项目从硬盘指定位置读取文件(获取静态资源)

    方法一:继承WebMvcConfigurerAdapter类 package com.imooc.demo.config; import org.springframework.context.ann ...

  7. Jeecg-Boot前后端分离版

    Jeecg-Boot前后端分离版http://www.jeecg.org/forum.php?gid=229 Jeecg-Boot 快速开发平台http://boot.jeecg.org/user/l ...

  8. Appium环境搭建-精简版

    Appium自动化环境准备 安装配置JDK 下载Android SDK并配置环境变量 安装模拟器或连接真机 安装appium desktop 安装python和pycharm (开发语言和开发工具) ...

  9. Kafka如何保证消息的可靠性传输

    1.消费端弄丢了数据 唯一可能导致消费者弄丢数据的情况,就是说,你消费到了这个消息,然后消费者那边自动提交了 offset,让 Kafka 以为你已经消费好了这个消息,但其实你才刚准备处理这个消息,你 ...

  10. sql 查询字段如果为null 则返回0的写法

    oracle select nvl(字段名,0) from 表名; ----------------------------------- sqlserver select isnull(字段名,0) ...