This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
BrowserModule | |
], | |
providers: [DataService], | |
bootstrap: [AppComponent] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const el = document.createElement('app-instruction-card'); | |
const cmp = new AppInstructionCardCmp(); | |
renderComponent(el, cmp); | |
if(ctx.val !== oldValue) { | |
cmp.value = ctx.val; | |
oldValue = cmp.value; | |
ng.updateView(el, cmp); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import '@nishugoel/my-web-comp/my-web-comp.js'; | |
class NewCustElement extends LitElement{ | |
render(){ | |
return html` | |
<my-web-comp></my-web-comp> // Using our custom element inside the implementation of another custom element | |
`; | |
} | |
} | |
customElements.define('new-cust-ele', NewCustElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="module" src="node_modules/package-name/my-web-comp.js"></script> | |
</head> | |
<body> | |
<my-web-comp></my-web-comp> | |
</body> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="module" src="/path/to/my-web-comp.js"></script> | |
</head> | |
<body> | |
<my-web-comp></my-web-comp> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@customElement('my-web-comp') | |
export class myWebComp extends LitElement { | |
@property() | |
compProp = 'hello'; | |
render(){ | |
return html`<p>${this.compProp}</p>`; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class myWebComp extends LitElement { | |
render() { | |
return html `<div>text here</div>` | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree { | |
const url = 'dest'; | |
const tree: UrlTree = this.router.parseUrl(url); | |
return tree; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type RunGuardsAndResolvers = 'pathParamsChange' | 'paramsChange' | 'paramsOrQueryParamsChange' | 'always'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.keys(containee).every(key => containee[key] === container[key]); | |
//changed to | |
Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key])); |