<svg\ onload=alert()/>
mehulmpt / angular6-youtube Goto Github PK
View Code? Open in Web Editor NEWAngular 6 code repo for YouTube web series
Angular 6 code repo for YouTube web series
<svg\ onload=alert()/>
File : MyLoggerMonitor.ts
import {NGXLoggerMonitor, NGXLogInterface} from 'ngx-logger';
import { HttpClient } from '@angular/common/http';
export class MyLoggerMonitor implements NGXLoggerMonitor {
private _url = 'src/app/log1.log'; // storing in local file
constructor(private httpClient: HttpClient) { }
onLog(log: NGXLogInterface,) {
// 1. format the log however you wish it to be formatted
const formattedLog: string = log.message + log.timestamp;
// 2. Make the HTTP Request
this.httpClient.post(this._url, formattedLog).subscribe((data:any)=>{
console.log('myCustomLoggerMonitor', data);
});
}
}
File : test1.component.ts
import { Component, OnInit } from '@angular/core';
import { NGXLogger } from '../logger.service';
import { MyLoggerMonitor } from '../my-logger-monitor';
@component({
selector: 'app-test1',
templateUrl: './test1.component.html',
styleUrls: ['./test1.component.css']
})
export class Test1Component implements OnInit {
constructor(private logger:NGXLogger) {
this.logger.registerMonitor(new MyLoggerMonitor());
this.logger.error('BLAHBLAHBLAH');
}
ngOnInit() {}
}
// i am getting error like
ERROR in src/app/test1/test1.component.ts:19:31 - error TS2554: Expected 1 arguments, but got 0.
19 this.logger.registerMonitor(new MyLoggerMonitor());
src/app/my-logger-monitor.ts:10:15
10 constructor(private httpClient: HttpClient) {
An argument for 'httpClient' was not provided.
Thank you in advance :)
Hello. Great guide. Can you post more of your commits past Tutorial 20. Right now the commits only go that far. Thanks!
Update: I just noticed that they do seem to go past tutorial 20 but I'm not seeing the server directory you created when transitioning to Node in Tutorial 22. Is that included in your commits somewhere and I'm missing it or more likely I'll have to do that step on my own? Thanks!
ERROR in No NgModule metadata found for 'AppModule'.
On my Mac, I am trying to create a service but it not working.
The error I have been getting is:
Ankits-MBP:project ankit$ ng generate service user
already exists.con
The Schematic workflow failed. See above.
ERROR in node_modules/@angular/core/src/render3/interfaces/container.d.ts(35,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/container.d.ts(40,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/container.d.ts(45,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/container.d.ts(50,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/container.d.ts(58,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/container.d.ts(79,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(50,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(56,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(66,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(68,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(70,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(79,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(87,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(94,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(103,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(109,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(111,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(113,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(115,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(122,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(131,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/render3/interfaces/view.d.ts(137,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(23,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(31,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(39,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(47,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(55,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
node_modules/@angular/core/src/sanitization/bypass.d.ts(63,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
i 「wdm」: Failed to compile.
Is this a versioning issue? How can I solve it? Thanks in advance.
Where's the register folder?
Angular CLI: 1.7.3
Node: 8.11.0
Npm: 5.8.0
OS: darwin x64
TypeScript: 2.8.1
After run:
ng server
i get this error:
ERROR in node_modules/@angular/common/src/location/location.d.ts(1,10): error TS2305: Module '"/angular6-youtube/node_modules/rxjs/Rx"' has no exported member 'SubscriptionLike'.
Great series! Just watched 31-36 and would like to review the code in my IDE, commit history gives me lesson 20 as latest commit. Am I missing something or is the code for those lessons hosted elsewhere?
In my Mac, when I am typing ng generate guard auth, then it is giving me the option to choose:
can activate
can activate child
can load
but when I select it and press enter then it gives error as below:
Ankits-MBP:my-first-app ankit$ ng generate guard auth
? Which interfaces would you like to implement? (Press 'space' to select, 'a' to toggle all, 'i' to invert selection)
already exists.con
The Schematic workflow failed. See above.
Ankits-MBP:my-first-app ankit$ ng generate guard auth?
Which interfaces would you like to implement?
❯◉ CanActivate
◯ CanActivateChild
◯ CanLoad
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.