Skip to content

Instantly share code, notes, and snippets.

💭
checking react these days!

rahul sahay rahulsahay19

💭
checking react these days!
Block or report user

Report or block rahulsahay19

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Custom.module.ts
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
@NgModule({
imports: [
RouterModule.forChild([{
path: '',
loadChildren: () => import('./lazy/lazy.module').then(m => m.LazyModule)
}])
]
View builder.ts
import { BuilderOutput, createBuilder } from '@angular-devkit/architect';
export default createBuilder((options, context) => {
return new Promise<BuilderOutput>(resolve => {
resolve({ success: true });
});
});
View registration.component.sandbox.ts
import { sandboxOf } from 'angular-playground';
import { RegistrationComponent } from './registration.component';
import { BrowserModule } from '@angular/platform-browser';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { FormsModule } from '@angular/forms';
const sandboxConfig = {
imports: [
FormsModule,
BrowserModule,
View home.component.sandobox.ts
import { sandboxOf } from 'angular-playground';
import { HomeComponent } from './home.component';
export default sandboxOf(HomeComponent)
.add('Home Component', {
template: `<app-home></app-home>`
});
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Poseidon</title>
<base href="./">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
View angular.json
module.exports = {
"externals": {
"rxjs": "rxjs",
"@angular/core": "ng.core",
"@angular/common": "ng.common",
"@angular/platform-browser": "ng.platformBrowser",
"@angular/elements": "ng.elements"
}
}
View header-module.ts
import { NgModule, Injector } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule, provideRoutes } from '@angular/router';
import { HttpModule } from '@angular/http';
import { HeaderComponent } from './header.component';
import { createCustomElement } from '@angular/elements';
@NgModule({
imports: [
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular Elements Demo</title>
</head>
<body>
View build-script.js
const fs = require('fs-extra');
const concat = require('concat');
(async function build() {
const files = [
'./dist/ng-elements/runtime.js',
'./dist/ng-elements/polyfills.js',
'./dist/ng-elements/main.js'
]
View app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, Injector } from '@angular/core';
import { createCustomElement } from '@angular/elements';
import { GreeterComponent } from './greeter/greeter.component';
@NgModule({
declarations: [
GreeterComponent
],
imports: [
You can’t perform that action at this time.