Code Monkey home page Code Monkey logo

angular-enterprise-application-development-samples's Issues

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node": HTTP error 404 Not Found

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node":

HTTP error 404 Not Found


package.json

{
  "name": "hello-world",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.0.4",
    "@angular/common": "^7.0.4",
    "@angular/compiler": "^7.0.4",
    "@angular/core": "^7.0.4",
    "@angular/forms": "^7.0.4",
    "@angular/http": "^7.0.4",
    "@angular/platform-browser": "^7.0.4",
    "@angular/platform-browser-dynamic": "^7.0.4",
    "@angular/router": "^7.0.4",
    "core-js": "^2.5.4",
    "rxjs": "^6.3.3",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.10.6",
    "@angular/cli": "~7.0.6",
    "@angular/compiler-cli": "^7.0.4",
    "@angular/language-service": "^7.0.4",
    "@types/jasmine": "~3.3.0",
    "@types/jasminewd2": "~2.0.6",
    "@types/node": "~10.12.10",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~3.3.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.1.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.4",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.1",
    "ts-node": "~7.0.1",
    "tslint": "~5.11.0",
    "typescript": "~3.1.6"
  }
}

第69页,把该组件的user属性改名为“selectedUser”

当时组件中不存在user属性,而是存在users。也不应该改users属性,而是添加selectedUser

`import { Component, OnInit } from '@angular/core';
import {User} from '../user';
import {USERS} from '../mock-users';

@component({
selector: 'app-users',
templateUrl: './users.component.html',
styleUrls: ['./users.component.css']
})
export class UsersComponent implements OnInit {
users = USERS;
selectedUser: User;
onSelect(user: User): void {
this.selectedUser = user;
}
constructor() { }

ngOnInit(): void {
}

}
`

chapter 24 的代码执行顺序问题

https://github.com/waylau/angular-enterprise-application-development-samples/blob/master/samples/ch24/news-headlines/src/app/news-detail/news-detail.component.ts#L28

  // 展示新闻详情数据
  showNewsDetailData() {
    this.route.queryParams.subscribe(p => this.newsUrl = p.newsUrl);// 获取参数

    this.newsDetailService.getNewsData(this.newsUrl).subscribe(
      (newsApiData) => this.newsDetailData =
        this.domSanitizer.bypassSecurityTrustHtml(newsApiData.toString()) //HTML过滤
    );
  }

是否应该修改为:

  showNewsDetailData() {
    this.route.queryParams.subscribe(p => {
      this.newsUrl = p.newsUrl;

      this.newsDetailService.getNewsData(this.newsUrl).subscribe(
        (newsApiData) => this.newsDetailData =
          this.domSanitizer.bypassSecurityTrustHtml(newsApiData.toString()) //HTML过滤
      );
    }  
  );// 获取参数

因为 不能 保证 二个subscribe里面函数的执行顺序 ?

2019年6月第1版2019年6月第1次印刷勘误、改进项

封面

封面设计建议带勒口,这样书角不容易折皱。

前言IV

“75个”应为“74个”

98页

“1.从路由参数中提取” 小节中。
原文“修改user.service.ts文件,在ngOnInit()生命周期钩子中调用getUsers(),代码如下:”

需要修改为:

“修改user-detail.component.ts文件,在ngOnInit()生命周期钩子中调用getUser(),代码如下:”

146页

“component-interaction”应为“component-styles”

390页

倒数第二行的“(3)0”应为“(3)”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.