daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { BrowserModule } from '@angular/platform-browser';
  2. import { NgModule } from '@angular/core';
  3. import { RouterModule, Routes } from '@angular/router';
  4.  
  5. import { AppComponent } from './app.component';
  6. import { ShareLocComponent } from './shareloc.component';
  7.  
  8. const appRoutes: Routes = [
  9.   { path: 'locsharing/:id', component: ShareLocComponent }
  10. ];
  11.  
  12. @NgModule({
  13.   declarations: [
  14.     ShareLocComponent,
  15.     AppComponent,
  16.   ],
  17.   imports: [
  18.     BrowserModule
  19.     ,RouterModule.forRoot(
  20.       appRoutes,
  21.       { enableTracing: true } // <-- debugging purposes only
  22.     )
  23.   ],
  24.   providers: [],
  25.   bootstrap: [AppComponent]
  26. })
  27. export class AppModule { }
  28.    
  29. import { Component } from '@angular/core';
  30.  
  31. @Component({
  32.   selector: 'app-container',
  33.   templateUrl: './shareloc.component.html',
  34.   styleUrls: ['./css/shareloc.css']
  35. })
  36.  
  37. export class ShareLocComponent {
  38.   constructor(){
  39.     console.log('Suresh here!');
  40.   }
  41.   title = 'My First Angular App';
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top