Skip to content

Instantly share code, notes, and snippets.

@hatemhosny
Created April 11, 2021 00:15
Show Gist options
  • Save hatemhosny/ae978c96a44a2b23f851ff5b049786ce to your computer and use it in GitHub Desktop.
Save hatemhosny/ae978c96a44a2b23f851ff5b049786ce to your computer and use it in GitHub Desktop.
Angular 6 starter
<my-app></my-app>
// app.js
const { Component, VERSION } = ng.core;
@Component({
selector: 'my-app',
template: `
<h1>{{title}} </h1>
TODO: Define your Angular ${VERSION.major} component.
`
})
class AppComponent {
title="hello world angular 6";
constructor() {
// TODO: Define your Angular component implementation
}
}
// main.js
const { BrowserModule } = ng.platformBrowser;
const { NgModule } = ng.core;
const { CommonModule } = ng.common;
@NgModule({
imports: [
BrowserModule,
CommonModule,
],
declarations: [AppComponent],
bootstrap: [AppComponent],
providers: []
})
class AppModule {}
const { platformBrowserDynamic } = ng.platformBrowserDynamic;
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));
console.log('hola');
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.2.1/rxjs.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.5.7/core.js"></script>
<script src="https://unpkg.com/@angular/core@6.0.5/bundles/core.umd.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.8.26/zone.min.js"></script>
<script src="https://unpkg.com/@angular/common@6.0.5/bundles/common.umd.js"></script>
<script src="https://unpkg.com/@angular/compiler@6.0.5/bundles/compiler.umd.js"></script>
<script src="https://unpkg.com/@angular/platform-browser@6.0.5/bundles/platform-browser.umd.js"></script>
<script src="https://unpkg.com/@angular/platform-browser-dynamic@6.0.5/bundles/platform-browser-dynamic.umd.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment