angular-university / angular-course Goto Github PK
View Code? Open in Web Editor NEWAngular Core Deep Dive (Video Course) - https://angular-university.io/course/angular-course
License: MIT License
Angular Core Deep Dive (Video Course) - https://angular-university.io/course/angular-course
License: MIT License
Expectation: Running the tests with npm test
works.
Actual: The test file highlighted.directive.spec.ts
currently looks like this on master:
import { HighlightedDirective } from './highlighted.directive';
describe('HighlightedDirective', () => {
it('should create an instance', () => {
const directive = new HighlightedDirective();
expect(directive).toBeTruthy();
});
});
However, the only constructor of HighlightedDirective
has a non-optional argument:
constructor(private coursesService: CoursesService) {
console.log('coursesService highlighted ' + coursesService.id);
}
A similar problem exists with ngx-useless.directive.spec.ts
and ngx-useless.directive.ts
, here we're missing two parameters:
constructor(private templateRef: TemplateRef<any>,
private viewContainer: ViewContainerRef) {
}
For this reason, running npm test
produces the following error message:
ERROR in src/app/courses/directives/highlighted.directive.spec.ts(5,23): error TS2554: Expected 1 arguments, but got 0.
src/app/courses/directives/ngx-unless.directive.spec.ts(5,23): error TS2554: Expected 2 arguments, but got 0.
C:\Users\home\3-services\3-services>npm run server
[email protected] server
./node_modules/.bin/ts-node -P ./server.tsconfig.json ./server.ts
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\home\3-services\3-services>
The vulnerabilities and other dependency warnings should be fixed by upgrading the dependencies:
$ npm install
npm WARN deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: V0 is gone and the best V1 polyfill is now @ungap/custom-elements
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.added 1180 packages, and audited 1181 packages in 35s
92 packages are looking for funding
runnpm fund
for details11 vulnerabilities (9 moderate, 2 high)
To address all issues, run:
npm audit fixRun
npm audit
for details.
Angular's beginners course lesson - injectable services describes the course as angular deep dive course. Also the previous lesson has the course card component developed but not the course-image component. it doesn't describe how to do that and directly skips to a lesson where we see course-image component in the template. Even though learned developers will know how it works and how it came there there has to be some explaination.
Please remember we This is a paid course and as paid users we want flawless experience.
I am facing issue your code
ERROR Error: NG02200: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables, such as Arrays. Did you mean to use the keyvalue
Hi,The server run on port 9000,then how did api request to port 4200 works?In my case it returns 404 error
GET http://localhost:4200/api/courses?page=1&pageSize=10 404 (Not Found)
http://localhost:9000/api/courses
How to resolve this issue while using Observable.
ERROR Error: NG02200: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables, such as Arrays. Did you mean to use the keyvalue
C:\Learning\angular-course-3-services-finished>npm run server
[email protected] server
node_modules/.bin/ts-node -P ./server.tsconfig.json ./server.ts
'node_modules' is not recognized as an internal or external command,
operable program or batch file.
I tried editing the "." in package.json "server": "node_modules/.bin/ts-node -P ./server.tsconfig.json ./server.ts".
still the same error.
You must add
import { HttpClient } from '@angular/common/http';
to file app.component.ts in order to compile the lesson.
Upgrading codelyzer from 0.0.28 to 6.0.0 worked for me
Line 44 in 3fedfca
I dont see the complete css file where template uses following classes but these classes are not present in any of the css files (app css or course card css).
.course-title
.course-description
Can you please let me know or if they are really missing update the relevant CSS files?
Hi. I tried to run the laster master branch, but there is an issue that appears to be introduced with angular 9. I fixed it in my forked repo.
stack overflow similar issue
Hello,
I followed the guide on internationalization and I'm sad to inform you, that it is outdated.
You already updated this repo to angular v13, but the i18n fields in the angular.json don't work anymore since v11.
I tested out your current master, then I also tested out some older commits to find out why it doesn't work.
When you run "ng build -c fr" it fails with the error:
Schema validation failed with the following errors: Data path "" must NOT have additional properties(i18nFile).
Then I tested the same command with commit "77a89a4226cc90e55dd1a8352f2e237b3e78d1b9" labeled "upgrade to angular 12" and I got the same result.
Commit: "88288b6f03384ff1ef916c5310cdd58609908f48" labeled "upgrade to Angular 11 and Node 14" worked, but it told me:
Option "i18nFile" is deprecated: Use 'locales' object in the project metadata instead.
Option "i18nLocale" is deprecated: Use 'localize' instead.
At the start when I was building the fr configuration.
Commit: "ec06a6131bd1c37a95d797002727d7ce6a502a6d" labeled "upgrade to angular 10" also worked, but without warning.
The way Angular handles i18n now is actually through adding locales to the workspace. It is very confusing to me at the moment, so I sadly can't point you to resources that will help you update your course.
Hello,
When cloning the project, and after downgrading to node 16 as directed in the repo, I receive this error and cannot run npm install
on the cloned repo
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/tslint
npm ERR! dev tslint@"~6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint@"^3.9.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^0.0.28" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/tslint
npm ERR! peer tslint@"^3.9.0" from [email protected]
npm ERR! node_modules/codelyzer
npm ERR! dev codelyzer@"^0.0.28" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
Any assistance would be appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.