Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule } from '@angular/core';
- import { RouterModule, Routes } from '@angular/router';
- import { AppComponent } from './app.component';
- import { ShareLocComponent } from './shareloc.component';
- const appRoutes: Routes = [
- { path: 'locsharing/:id', component: ShareLocComponent }
- ];
- @NgModule({
- declarations: [
- ShareLocComponent,
- AppComponent,
- ],
- imports: [
- BrowserModule
- ,RouterModule.forRoot(
- appRoutes,
- { enableTracing: true } // <-- debugging purposes only
- )
- ],
- providers: [],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
- import { Component } from '@angular/core';
- @Component({
- selector: 'app-container',
- templateUrl: './shareloc.component.html',
- styleUrls: ['./css/shareloc.css']
- })
- export class ShareLocComponent {
- constructor(){
- console.log('Suresh here!');
- }
- title = 'My First Angular App';
- }
Add Comment
Please, Sign In to add comment