摘要: 基本用法 import { Component } from '@angular/core'; @Component({ selector: 'app-root', template: ` <button type="button" class="btn btn-primary" (click)=" 阅读全文
posted @ 2020-10-11 15:18 jahoon 阅读(120) 评论(0) 推荐(0)
摘要: 创建组件的命令 ng generate component <组件名> [options] 简写:ng g c <组件名> [options] eg: ng g c comp1 (在src/app下创建名为comp1的组件) ng g c components/comp1 (在src/app/com 阅读全文
posted @ 2020-10-11 14:53 jahoon 阅读(67) 评论(0) 推荐(0)
摘要: 绑定图片 import { Component } from '@angular/core'; @Component({ selector: 'app-root', template: ` <img src="../assets/images/madao.jpg" alt="madao" /> <i 阅读全文
posted @ 2020-10-11 14:47 jahoon 阅读(122) 评论(0) 推荐(0)
摘要: 基本用法 import { Component } from '@angular/core'; @Component({ selector: 'app-root', template: ` <h1>{{title}}</h1> <h2>My favorite hero is: {{myHero}}< 阅读全文
posted @ 2020-10-11 14:21 jahoon 阅读(201) 评论(0) 推荐(0)