Giter Site home page Giter Site logo

pro-angular-6's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pro-angular-6's Issues

Book formatting p154

page 154
following line should be in bold and previous line not in bold.
import { Order } from "./order.model";

Chapter 8 Cross Origin error

I am using the book with Angular 7 so I appreciate this may be out of support.
(I am automatically upgrading the code for each chapter).

Thank you for providing the code for each Chapter (unlike some alternative videos/books) this makes a real difference if you get stuck in one chapter.

I get the following error in Chapter 8.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3500/products

I get the same problem in Firefox 63 and Chrome 70, on Windows 10

Any suggestions? I think I need to change the REST server to send a header but I do not know the details.

Pagination correction

At end of chapter 7 the app has undesirable behavior that on 'Home' selecting page 4 and then changing categories leaves no products showing. Suggested improvement below to store.component.ts

    changeCategory(newCategory?: string) {
        this.selectedCategory = newCategory
        this.changePage(1); 
    }

Chapter 10 - prod build

I am trying to build prod but get that error:

ERROR in : Cannot determine the module for class CartSummaryComponent in D:/PROJECTS/sdtyn/pro-angular-6/SportsStore/src/app/store/cartSummary.component.ts! Add CartSummaryComponent to the NgModule to fix it.

I am using Angular-7.2.0 and I think it is a problem with Angular 7.
How can I fix this issue? Any idea?

Capter 5 wrong command

In the "Preparing the example project" section the command to create the project shoud be:

ng new JavaScriptPrimer

Chapter 5 & 6 sample code--Beginning or End?

Is the code provided as Ch 5 and Ch 6 the code at the beginning or the end of the chapter? It is not clear to several people I've talked to. Some authors provide the end of chapter code, some the beginning.

Chapter 8, section "GUARDING THE ROUTES" likely outdated

I don't know why, but this statement is not true, hence should be updated if possible:

Remember that navigation can be performed only by the application. If you change the URL directly in the browser’s URL bar, the browser will request the URL you enter from the web server.

Ps: it is possible to change the URL directly in the browser's URL bar and go to correct component template. (Angular 6)

Bug in book

Translation:
When I finished chapter 9 of the book I got an error that I saw that in your github also that error comes out if you could solve it would be great. Thanks is a great book

ERROR:
PUT http://localhost:3500/orders/1 401 (Unauthorized)
ERROR HttpErrorResponse {headers: HttpHeaders, status: 401, statusText: "Unauthorized", url: "http://localhost:3500/orders/1", ok: false, …}

Only final code is available

Git repository has the final code from each chapter. There is only single project in each chapter even though multiple topics are addressed. The resulting code is for the last project in the chapter. Am I missing something?

Was not able to serve first angular app

p. 11 when running : ng serve --port 3000 open

I got the following error.

Thank you very much.

PS C:\web\angularTest\todo\src> ng serve --port 3000 --open
** Angular Live Development Server is listening on localhost:3000, open your browser on http://localhost:3000/ **
10% building modules 6/6 modules 0 activei 「wds」: Project is running at http://localhost:3000/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to //index.html

Date: 2019-10-13T06:46:40.749Z
Hash: b287a6d9b0afddc8d6f3
Time: 1978ms
chunk {main} main.js, main.js.map (main) 354 kB [entry] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 354 kB [entry] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 513 kB [entry] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.5 kB [initial] [rendered]

ERROR in ../node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.
../node_modules/rxjs/internal/types.d.ts(82,52): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(82,88): error TS1005: ';' expected.
../node_modules/rxjs/internal/types.d.ts(82,92): error TS1109: Expression expected.

i 「wdm」: Failed to compile.

chapter 27

I have problem with terms.guard.

import { Injectable } from "@angular/core";
import { ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router";
import { MessageService } from "./messages/message.service";
import { Message } from "./messages/message.model";

@Injectable()
export class TermsGuard {
constructor(private messages: MessageService,
private router: Router) { }
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):
Promise | boolean {

    if (route.params["mode"] == "create") {
        return new Promise<boolean>((resolve, reject) => {
            let responses: [string, (string) => void][] = [
                ["Yes", () => resolve(true)],
                ["No", () => resolve(false)]
            ];
            this.messages.reportMessage(
                new Message("Do you accept the terms & conditions?",
                    false, responses));
        });
    } else {
        return true;
    }
}

}

An error of the following type occurs:
ERROR in src/app/terms.guard.ts(27,32): error TS2345: Argument of type '[string, (string: any) => void][]' is not assignable to parameter of type '[string, (string: any) => void[]]'.
Property '0' is missing in type '[string, (string: any) => void][]'.

I am not very well versed in promises and therefore do not quite understand how to correct the error.

Chapter 8, 8-19 missing closing div tag

In the page of cartDetail.component.html, the code in the last tag lacks of closing div tag for the code:
<div class="col">

Although the code can run normally without the closing div tag. It's better to add it to prevent from confusing.

Ch 10 - Invalid rule result: Instance of class Promise.

When installing the @angular/pwa package with 'ng add @angular/pwa', I get the following error on the command line:

Invalid rule result: Instance of class Promise.

Going further in the chapter, it seems that some of the files that were supposed to be added are not present.

Any Ideas?

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.