Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Last active November 15, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/57737518165a167085d6d6124673a98c to your computer and use it in GitHub Desktop.
Save rahulsahay19/57737518165a167085d6d6124673a98c to your computer and use it in GitHub Desktop.
dynamic.component
import { Component } from '@angular/core';
import { LoggingService } from './looging-service';
@Component({
selector: 'dynamic-component',
template: `
<div class="container">
<div><strong>Dynamic Modules and Components</strong></div>
<div>This component was loaded dynamically with its dependencies</div>
<strong><a routerLink="/" routerLinkActive="active">Back</a></strong>
</div>
`
})
export default class DynamicComponent {
constructor(private logging:LoggingService){
logging.logToConsole('Logged Message via SPA Core');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment