Last active
November 15, 2017 08:57
-
-
Save rahulsahay19/57737518165a167085d6d6124673a98c to your computer and use it in GitHub Desktop.
dynamic.component
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 { 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