Skip to content

Commit

Permalink
项目构建&部署&多环境
Browse files Browse the repository at this point in the history
  • Loading branch information
Goddreamwt committed Aug 6, 2018
1 parent dcc9cda commit f5535f8
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion auction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
Expand Down
5 changes: 5 additions & 0 deletions auction/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import {environment} from "../environments/environment";

// 装饰器
@Component({
Expand All @@ -11,4 +12,8 @@ import { Component } from '@angular/core';
// 控制器
export class AppComponent {
title = 'angular学习,哈哈哈哈';

constructor(){
console.log("微信号是"+environment.weixinNumber);
}
}
4 changes: 3 additions & 1 deletion auction/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { FilterPipe } from './pipe/filter.pipe';
import { WebSocketComponent } from './web-socket/web-socket.component';
import {WebSocketService} from "./shared/web-socket.service";
import {HttpClientModule} from '@angular/common/http';
import {LocationStrategy, HashLocationStrategy} from "@angular/common";

const routeConfig: Routes = [
{path: '', component: HomeComponent},
Expand Down Expand Up @@ -45,7 +46,8 @@ const routeConfig: Routes = [
HttpClientModule
],

providers: [ProductService,WebSocketService],
providers: [ProductService,WebSocketService,
{provide:LocationStrategy,useClass:HashLocationStrategy}],
bootstrap: [AppComponent],
})
export class AppModule {
Expand Down
3 changes: 2 additions & 1 deletion auction/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export const environment = {
production: true
production: true,
weixinNumber: "生产环境微信号"
};
3 changes: 2 additions & 1 deletion auction/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
weixinNumber:"开发环境微信号"
};

/*
Expand Down
2 changes: 1 addition & 1 deletion auction/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//核心模块提供的enableProdMode用来,用来关闭angular的开发者模式
//核心模块提供的enableProdMode用来,用来关闭angular的开发者模式
import { enableProdMode } from '@angular/core';
//使用哪个模块来启动应用
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
Expand Down
Binary file added image/QQ20180806-103357.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-103413.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-103843.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-105152.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-105342.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-110308.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-110406.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-111310.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-111541.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-111906.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-113812.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-113825.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/QQ20180806-113837.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f5535f8

Please sign in to comment.