5.3k 5 分钟

父组件不仅可以给子组件传递简单的数据,还可以把自己的方法以及整个父组件传给子组件 # 创建项目与组件 D:\angular>ng new angulardemo07D:\angular>cd angulardemo07D:\angular\angulardemo07>ng g component components/homeD:\angular\angulardemo07>ng g component components/newsD:\angular\angulardemo07>ng g component...
9.7k 9 分钟

# 背景 Vue 版本: 2.6.10 vue-element-admin 版本:4.2.1 日历组件: vue-simple-calendar@5.0.1 日历组件 Github 地址: https://github.com/richardtallent/vue-simple-calendar 日历组件在线 Demo 地址: https://tallent.us/vue-simple-calendar/ 需求: 用户希望通过右键 calendar 组件里某一天的某一项,弹出一个菜单,在菜单里面修改这一项 # 效果 # 代码 下面代码直接引入到 router 里的 index.js...
4.8k 4 分钟

# 涉及命令 PS D:\angular\angulardemo06> ng new angulardemo06 # 创建项目PS D:\angular\angulardemo06> ng g component components/home # 创建 home 组件PS D:\angular\angulardemo06> ng g component components/news # 创建新闻组件PS D:\angular\angulardemo06> ng g component components/header # 创建 header 头部组件PS...
6k 5 分钟

# 相关命令 PS D:\angular\angulardemo05> ng --help # 获取帮助PS D:\angular\angulardemo05> ng g --help # 获取帮助PS D:\angular\angulardemo05> ng g service services/storage # 创建服务PS D:\angular\angulardemo05> ng serve --open # 启动项目# app.module.ts import { NgModule } from...
2.5k 2 分钟

# 创建组件 PS D:\angular\angulardemo05> ng g component components/todolist# app.module.ts 引入 form module import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { FormsModule } from...
1.7k 2 分钟

# 创建组件 PS D:\angular\angulardemo05> ng g component components/search# app.module.ts 引入 form module import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { FormsModule } from...
4.1k 4 分钟

# Angular 组件基础使用 ng g component components/home , app.module.ts 文件会自动添加 HomeComponent 组件 app.component.html 文件添加标签 <app-home></app-home> app.module.ts 手动添加 FormsModule 组件,测试表单数据双向绑定,即 MVVM,注意 imports home.component.scss 的简单样式不再罗列,可以自行补入 home.component.ts 代码如下import...
4.3k 4 分钟

# Angular 组件以及组件中的模板合成 下面在 news 组件中测试数据绑定以及普及一些数据结构、语法的基本使用。 news.component.tsimport { Component, OnInit } from '@angular/core';@Component({ selector: 'app-news', templateUrl: './news.component.html', styleUrls:...
2.3k 2 分钟

# 概述 # 备份概述 linux 系统需要备份的数据,主要有以下几个目录 /root/ 目录:root 用户的家目录 /home/ 目录:普通用户的家目录 /var/spool/mail/ 目录:邮件目录 /etc/ 目录:重要的配置文件目录 其他目录:比如日志目录等 自己安装的服务的数据,如: apache 需要备份的数据 配置文件 网页主目录 日志文件 mysql 需要备份的数据 源码包安装的 mysql:/usr/local/mysql/data/ rpm 包安装的...