Click here to Skip to main content
14,452,963 members

JavaScript

 
QuestionTrouble uploading files with aws s3 Pin
Member 1398382813-Sep-18 14:15
MemberMember 1398382813-Sep-18 14:15 
AnswerRe: Trouble uploading files with aws s3 Pin
jkirkerx1-Oct-18 9:04
professionaljkirkerx1-Oct-18 9:04 
Questiongetting error period.draggable is not a function Pin
Gopal Kan12-Sep-18 20:49
MemberGopal Kan12-Sep-18 20:49 
AnswerRe: getting error period.draggable is not a function Pin
Graham Breach12-Sep-18 22:08
MemberGraham Breach12-Sep-18 22:08 
QuestionModal popup with datalist Pin
thepast12-Sep-18 9:18
Memberthepast12-Sep-18 9:18 
QuestionJavascript and extensions Pin
Member 1398114211-Sep-18 16:10
MemberMember 1398114211-Sep-18 16:10 
QuestionWhen pressing right and left keys object not moving in javascript game. Pin
Member 1396097131-Aug-18 12:10
MemberMember 1396097131-Aug-18 12:10 
QuestionAngular 6, lazy loading, with routerLink="/reviews" it works, type the Url localhost:5000/reviews and page not found Pin
jkirkerx17-Aug-18 14:06
professionaljkirkerx17-Aug-18 14:06 
I don't get it. You would think that if someone deeplinks to localhost:5000/reviews that the page would display, and not have to use routerLink to get to the page. It works with routerLink, but I can't refresh the page, or hand type the url.

My home works localhost:5000/home and I can type every url route to access the page.
I read the previous post Angular sucks, OK it kind of does. Bu tI'm pretty close to completing my learning project.

Here's my app.module, and below review module. Maybe I missed something here.
Tomorrow I'll recreate this using straight ng and see what happens.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { CoreModule } from '../core/core.module';
import { MDBBootstrapModule } from 'angular-bootstrap-md';
import { AppComponent } from './app.component';
import { AdminSharedModule } from '../admin/shared/adminShared.module';
import { HomeSharedModule } from '../home/shared/homeShared.module';
import { PortfoliosSharedModule } from '../portfolios/shared/portfoliosShared.module';

export const AppRoutes: Routes = [
    { path: '', pathMatch: 'full', redirectTo: 'home' },
    { path: 'home', loadChildren: '../home/home.module#HomeModule' },
    { path: 'reviews', loadChildren: '../reviews/reviews.module#ReviewsModule' },
    { path: 'portfolios', loadChildren: '../portfolios/portfolios.module#PortfoliosModule' },
    { path: 'admin', loadChildren: '../admin/admin.module#AdminModule' }
];

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        CoreModule.forRoot(),
        BrowserModule,
        BrowserAnimationsModule,
        CommonModule,
        FormsModule,
        HttpModule,
        HttpClientModule,
        ReactiveFormsModule,
        MDBBootstrapModule.forRoot(),
        AdminSharedModule,
        HomeSharedModule,
        PortfoliosSharedModule,
        RouterModule.forRoot(AppRoutes)
    ],
    exports: [
        RouterModule
    ],
    schemas: [
        NO_ERRORS_SCHEMA
    ],
    bootstrap: [AppComponent]
})

export class AppModule { }

And my review module
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MDBBootstrapModule } from 'angular-bootstrap-md';

import { RouterModule, Routes } from '@angular/router';
import { ReviewsComponent } from './components/reviews.component';

const reviewsRoutes: Routes = [
    { path: '', component: ReviewsComponent }
];

@NgModule({<br />
    exports: [
        RouterModule
    ],
    imports: [
        CommonModule,
        FormsModule,
        HttpClientModule,
        MDBBootstrapModule.forRoot(),
        RouterModule.forChild(reviewsRoutes)<br />
    ],<br />
    declarations: [
        ReviewsComponent
    ]
})

export class ReviewsModule { }
If it ain't broke don't fix it
Discover my world at jkirkerx.com


modified 18-Aug-18 14:06pm.

AnswerRe: Angular 6, lazy loading, with routerLink="/reviews" it works, type the Url localhost:5000/reviews and page not found Pin
jkirkerx18-Aug-18 14:31
professionaljkirkerx18-Aug-18 14:31 
General[Solved] Pin
jkirkerx20-Aug-18 10:25
professionaljkirkerx20-Aug-18 10:25 
QuestionCoding Newbie Pin
Rokas Steiblys17-Aug-18 11:21
MemberRokas Steiblys17-Aug-18 11:21 
AnswerRe: Coding Newbie Pin
Richard MacCutchan17-Aug-18 22:37
communityengineerRichard MacCutchan17-Aug-18 22:37 
AnswerRe: Coding Newbie Pin
Nathan Minier20-Aug-18 2:34
professionalNathan Minier20-Aug-18 2:34 
SuggestionRe: Coding Newbie Pin
Member 1395671021-Aug-18 7:28
MemberMember 1395671021-Aug-18 7:28 
QuestionExsplicit JavaScript regular exspression Pin
calmchess16-Aug-18 14:17
Membercalmchess16-Aug-18 14:17 
AnswerRe: Explicit JavaScript regular expression Pin
Richard Deeming17-Aug-18 8:02
communityengineerRichard Deeming17-Aug-18 8:02 
QuestionUsing data from odata in react-native Pin
Mike V Baker12-Aug-18 17:59
MemberMike V Baker12-Aug-18 17:59 
AnswerRe: Using data from odata in react-native Pin
Richard MacCutchan12-Aug-18 22:03
communityengineerRichard MacCutchan12-Aug-18 22:03 
QuestionWeb Application Pin
Awal Swed9-Aug-18 5:35
MemberAwal Swed9-Aug-18 5:35 
AnswerRe: Web Application Pin
Richard MacCutchan9-Aug-18 6:48
communityengineerRichard MacCutchan9-Aug-18 6:48 
Questioniframe history not cleaned up on refresh in Chrome and Opera Pin
CCTuss9-Aug-18 4:25
MemberCCTuss9-Aug-18 4:25 
AnswerRe: iframe history not cleaned up on refresh in Chrome and Opera Pin
F-ES Sitecore10-Aug-18 0:35
mveF-ES Sitecore10-Aug-18 0:35 
GeneralRe: iframe history not cleaned up on refresh in Chrome and Opera Pin
CCTuss10-Aug-18 2:27
MemberCCTuss10-Aug-18 2:27 
Questionhow to add image Pin
Member 139364115-Aug-18 23:35
MemberMember 139364115-Aug-18 23:35 
AnswerRe: how to add image Pin
Nathan Minier7-Aug-18 3:49
professionalNathan Minier7-Aug-18 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.