From cdc15b979c218048db37cf7f53932354ac8957e1 Mon Sep 17 00:00:00 2001 From: Ruin <1830275783@qq.com> Date: Fri, 4 Mar 2022 15:56:45 +0800 Subject: [PATCH] commit --- README.md | 28 +----------- package-lock.json | 11 +++++ package.json | 3 +- src/app/app.component.html | 2 +- src/app/app.component.scss | 9 +--- src/app/app.module.ts | 12 ++--- src/app/components/components.module.ts | 10 ++--- src/app/components/list/list.component.html | 19 +++++++- src/app/components/list/list.component.ts | 23 +++++++--- src/app/components/news/news.component.html | 28 +++++++++++- src/app/components/news/news.component.ts | 42 +++++++++++++----- src/app/core/core.module.ts | 12 +++-- .../home/components/body/body.component.html | 42 +++++++++++------- .../home/components/body/body.component.scss | 5 +++ .../home/components/body/body.component.ts | 14 +++--- .../home/components/head/head.component.html | 37 +++++++++++++-- .../home/components/head/head.component.scss | 11 +++++ .../home/components/head/head.component.ts | 28 ++++++------ src/app/pages/home/home.component.html | 24 +++++++--- src/app/pages/home/home.component.ts | 20 +++++---- src/app/pages/home/home.module.ts | 21 +++++---- src/app/pages/pages.module.ts | 4 +- src/app/pages/user/user.component.html | 2 +- src/app/pages/user/user.module.ts | 14 +++--- src/assets/images/home/cat.png | Bin 0 -> 119663 bytes src/index.html | 30 ++++++++----- 26 files changed, 296 insertions(+), 155 deletions(-) create mode 100644 src/assets/images/home/cat.png diff --git a/README.md b/README.md index e1e69bb..2431771 100644 --- a/README.md +++ b/README.md @@ -1,27 +1 @@ -# LearnNg - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.3. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. +# 自己搭建的一个基于 Angular13 的脚手架 diff --git a/package-lock.json b/package-lock.json index 6a02114..a1a0ee3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@angular/platform-browser": "~13.0.0", "@angular/platform-browser-dynamic": "~13.0.0", "@angular/router": "~13.0.0", + "normalize-scss": "^7.0.1", "rxjs": "~7.4.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" @@ -7661,6 +7662,11 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-scss": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/normalize-scss/-/normalize-scss-7.0.1.tgz", + "integrity": "sha512-qj16bWnYs+9/ac29IgGjySg4R5qQTp1lXfm7ApFOZNVBYFY8RZ3f8+XQNDDLHeDtI3Ba7Jj4+LuPgz9v/fne2A==" + }, "node_modules/npm-bundled": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/npm-bundled/-/npm-bundled-1.1.2.tgz", @@ -17853,6 +17859,11 @@ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true }, + "normalize-scss": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/normalize-scss/-/normalize-scss-7.0.1.tgz", + "integrity": "sha512-qj16bWnYs+9/ac29IgGjySg4R5qQTp1lXfm7ApFOZNVBYFY8RZ3f8+XQNDDLHeDtI3Ba7Jj4+LuPgz9v/fne2A==" + }, "npm-bundled": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/npm-bundled/-/npm-bundled-1.1.2.tgz", diff --git a/package.json b/package.json index 6adc5f5..4cfdaed 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --open", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test" @@ -18,6 +18,7 @@ "@angular/platform-browser": "~13.0.0", "@angular/platform-browser-dynamic": "~13.0.0", "@angular/router": "~13.0.0", + "normalize-scss": "^7.0.1", "rxjs": "~7.4.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" diff --git a/src/app/app.component.html b/src/app/app.component.html index 38ea303..4cbe716 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -4,7 +4,7 @@ * @Author: Ruin 🍭 * @Date: 2022-03-03 16:21:23 * @LastEditors: 刘引 - * @LastEditTime: 2022-03-04 11:00:55 + * @LastEditTime: 2022-03-04 15:50:32 --> diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 62c165e..2369822 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -1,8 +1 @@ -* { - margin: 0; - padding: 0; -} -.w { - width: 1200px; - margin: 0 auto; -} +@import "../../node_modules/normalize-scss/sass/normalize"; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index e714d1f..41c2d71 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -4,18 +4,18 @@ * @Author: Ruin 🍭 * @Date: 2022-03-03 16:21:23 * @LastEditors: 刘引 - * @LastEditTime: 2022-03-04 10:09:24 + * @LastEditTime: 2022-03-04 15:49:55 */ // 引入核心模块 -import { NgModule } from '@angular/core'; +import { NgModule } from "@angular/core"; // 引入浏览器解析模块 -import { BrowserModule } from '@angular/platform-browser'; +import { BrowserModule } from "@angular/platform-browser"; // 引入路由模块 -import { AppRoutingModule } from './app-routing.module'; +import { AppRoutingModule } from "./app-routing.module"; // 引入根组件 -import { AppComponent } from './app.component'; +import { AppComponent } from "./app.component"; // @ngModule装饰器 @ngModule接受一个元数据对象 告诉angular如何编译和启动对象\ -import { CoreModule } from './core/core.module'; +import { CoreModule } from "./core/core.module"; @NgModule({ declarations: [AppComponent], //配置项目运行的组件 diff --git a/src/app/components/components.module.ts b/src/app/components/components.module.ts index 416d959..28c4f2f 100644 --- a/src/app/components/components.module.ts +++ b/src/app/components/components.module.ts @@ -4,12 +4,12 @@ * @Author: Ruin 🍭 * @Date: 2022-03-03 16:58:41 * @LastEditors: 刘引 - * @LastEditTime: 2022-03-04 10:54:07 + * @LastEditTime: 2022-03-04 15:44:31 */ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { NewsComponent } from './news/news.component'; -import { ListComponent } from './list/list.component'; +import { NgModule } from "@angular/core"; +import { CommonModule } from "@angular/common"; +import { NewsComponent } from "./news/news.component"; +import { ListComponent } from "./list/list.component"; @NgModule({ declarations: [NewsComponent, ListComponent], diff --git a/src/app/components/list/list.component.html b/src/app/components/list/list.component.html index 7c1fe15..4ce59a2 100644 --- a/src/app/components/list/list.component.html +++ b/src/app/components/list/list.component.html @@ -1 +1,18 @@ -
list works!
+ +{{ msg }}
+ +{{ msg }}
+body {{ content }}
- - - -1+2 = {{ 1 + 2 }} - -body {{ content }}
+ + + + 1+2 = {{ 1 + 2 }} + +
+ {{ userName }}{{ title }}
-我是一个p标签
+
+ 表示已经支付
+已经支付并且确认订单
+表示已经发货
+已经没有货了
+ +[*ngClass演示]
+[*ngStyle演示]
+home works!
-user works!
dBJWs)c&wxe20I3y~1edzv`Fg?Sx}q|W(+uQd
zNto!#t{4<8_VKV+Waq{Rf8{XxrX)Jp?FuOE4)B)_Ueb4A227y`LM$CT4{4Jv*TyDd
z_u{}dC;81FloQODMwn4+!{^VR@!RJwxGo;p5R4C5R{&_BOsG{|>O$gLmLt-!f8VGY
zk1GucjrXRxCx(qn%i}GC!Z+Q+Nu6wuVwXx}UjzFrT_33yl6#eT40Ur7Zmp{Bdff_!
zS_lD5f&j|)ty@>nTa$&@h-m96KZRVO!m7?Ky5$6WYinTWCL>A!XT=qUqdT~+NQH@V
z!Xgc6SwQn_Tw-F%AmK0{;Hd?1M3O4YX)bDRlY;m#i)ffOE5Fv_=UzZQB2o5POW^d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