the error occurs when i run the web program in Firefox
but it works well in other browser (include ie/edge/chrome),
the angular version is 4.0
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
import { Component } from '@angular/core';
@Component({
moduleId: this.id,
selector: 'my-app',
template: `<router-outlet></router-outlet>`
})
export class AppComponent {
}import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppRoutingModule } from './app-routing.module';
import { LoginModule } from './LoginModule/login.module';
import { AppComponent } from './app.component';
import { IndexComponent } from './Component/index.component';
import { Home } from "./Component/Index";//home tab
//primeng
import { DataTableModule, SharedModule } from 'primeng/primeng';
//material
import {
MaterialModule,
OverlayContainer,
FullscreenOverlayContainer,
MdSelectionModule,
} from '@angular/material';
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
HttpModule,
ReactiveFormsModule,
MaterialModule, //material
MdSelectionModule, //material
AppRoutingModule, //route
DataTableModule, //primeng
SharedModule,//primeng
LoginModule
],
declarations: [
AppComponent,
IndexComponent,
Home
],
providers: [
{ provide: OverlayContainer, useClass: FullscreenOverlayContainer }
],
bootstrap: [AppComponent]
})
export class AppModule { }import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { IndexComponent } from './Component/index.component';
import { indexroutes } from './Component/project-routing.module';
export const approutes: Routes = [
{ path: '', redirectTo: 'login', pathMatch: 'full' },
{ path: 'index', component: IndexComponent,children: indexroutes }
];
@NgModule({
imports: [RouterModule.forRoot(approutes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
class AppRoutingModuleImpl extends AppRoutingModule {
}export class NavLink {
link: string;
label: string;
constructor(route: string, name: string) {
this.link = route;
this.label = name;
}
}
export class subNavItem {
name: string;
route: string;
}
export interface INavItems {
title: string;
isActive: boolean;
subNavItems?: subNavItem[];
}
export class ColleagueInfo {
username: string;
userpassword: string;
userid: string;
userpowername: string;
userpowerid: number;
usergroupname: string;
usergroupid: number;
}
export class DialogData {
title: string;
dialogtype: string;
data: any;
}
export class DialogReturnData {
retflag: number;
data: any;
}
export class GroupInfo {
groupid: number;
groupname: string;
}
export class PowerInfo {
powerid: number;
powername: string;
}
export class ProjectInfo {
projectid: number;
projectname: string;
projectstartdate: string;
projectenddate: string;
managerid: string;
managername: string;
realenddate: string;
projectmessage: string;
projectdescribe: string;
}
export class TaskInfo {
projectid: number;
projectname: string;
taskid: number;
taskname: string;
startdate: string;
planenddate: string;
realenddate: string;
managername: string;
managerid: string;
taskmessage: string;
taskdescibe: string;
}// import 'rxjs/Rx'; // adds ALL RxJS statics & operators to Observable
// See node_module/rxjs/Rxjs.js
// Import just the rxjs statics and operators needed for THIS app.
// Statics
import 'rxjs/add/observable/throw';
// Operators
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/toPromise';
import { Component, ViewEncapsulation } from '@angular/core';
@Component({
moduleId: this.id,
selector: 'app-app',
templateUrl: './app/Template/index.component.html',
styleUrls: ['./app/Styles/index.component.css'],
encapsulation: ViewEncapsulation.None,
})
export class IndexComponent {
}import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'home',
template: `
<p>welcome</p>
`
})
export class Home { }import { Routes } from '@angular/router';
import { Home } from '../Component/Index';
export const indexroutes: Routes = [
{ path: '', redirectTo: 'index', pathMatch: 'full' },
{ path: 'index', component: Home }
];
import { Component, Inject } from '@angular/core';
import { Router } from '@angular/router';
@Component({
moduleId: this.id,
selector: 'my-log',
templateUrl: './app/Template/login.component.html',
styleUrls: ['./app/Styles/login.component.css']
})
export class LoginFormComponent {
constructor( @Inject(Router) private router: Router) { }
onSubmit() {
this.router.navigate(['/index']);
}
}import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { MaterialModule } from '@angular/material';
import { LoginRoutingModule } from './login-routing.module';
import { LoginFormComponent } from './Login.component';
@NgModule({
imports: [
CommonModule,
FormsModule,
LoginRoutingModule,
MaterialModule
],
declarations: [LoginFormComponent]
})
export class LoginModule { }import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginFormComponent } from './Login.component';
export const loginroutes: Routes = [
{ path: 'login', component: LoginFormComponent }
];
@NgModule({
imports: [RouterModule.forChild(loginroutes)],
exports: [RouterModule]
})
export class LoginRoutingModule { }
class AppRoutingModuleImpl extends LoginRoutingModule {
}