Git Product home page Git Product logo

Comments (7)

DeborahK avatar DeborahK commented on June 9, 2024

Can you post the code for your routes?

from angular-gettingstarted.

neerajkumarnj avatar neerajkumarnj commented on June 9, 2024

This is the code for my module file::

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';

import { AppComponent } from './app.component';
import { ProductListComponent } from './products/product-list.component';
import { ProductFilterPipe } from './products/product-filter.pipe';
import { StarComponent } from './shared/star.component';
import { ProductDetailComponent } from './products/product-detail.component';
import { WelcomeComponent } from './home/welcome.component';
import { ProductDetailGuard } from './products/product-guard.service';

@NgModule({
imports: [ BrowserModule,
FormsModule,
HttpModule,
RouterModule.forRoot([
{ path:'products', component: ProductListComponent },
{ path: 'product/:id', canActivate: [ ProductDetailGuard ] , component: ProductDetailComponent },
{ path: 'welcome', component: WelcomeComponent },
{ path: '', redirectTo:'welcome', pathMatch: 'full' },
{ path: '**', redirectTo: ' welcome', pathMatch: 'full' }
])],
providers:[ ProductDetailGuard],
declarations: [ AppComponent, ProductListComponent, ProductFilterPipe, StarComponent, ProductDetailComponent, WelcomeComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }

from angular-gettingstarted.

neerajkumarnj avatar neerajkumarnj commented on June 9, 2024

Hi Deborah, did you get any ideas ?

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

Does this work for you if you use the Final version of the code provided here? Do you have access to a file compare utility that you could compare your code files to those Final versions? Or compare to the module 11 files from the Pluralsight page (that way it will be at the same place in the course.)

from angular-gettingstarted.

neerajkumarnj avatar neerajkumarnj commented on June 9, 2024

I do have access to the file compare utility. I will try the comparison and will update here.

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

Were you ever able to make this work? Can I close the issue?

from angular-gettingstarted.

DeborahK avatar DeborahK commented on June 9, 2024

I have not heard anything back so am closing this issue. Please let me know if you are still having problems and we can reopen it.

from angular-gettingstarted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.