Angular2更新

时间:2017-02-09 09:52:37

标签: node.js angular

我将angular2更新为最新版本,同时我将nodejs更新为v6.9.5

在我这样做后,我得到了下一个错误

  

ERROR in Error遇到静态解析符号值。   不支持表达形式(原始.ts中的位置14:3   文件),解决符号字典   C:/NodeJs/analytics/client/src/app/translate/translations.ts,   解决符号TRANSLATI ON_PROVIDERS   C:/NodeJs/analytics/client/src/app/translate/translations.ts,   在C:/ Node中解析符号TRANSLATION_PROVIDERS   Js / analytics / client / src / app / translate / index.ts,解析符号   App中的AppModule:/NodeJs/analytics/client/src/app/app.module.ts,   解决符号AppModule in   C:/NodeJs/analytics/client/src/app/app.module.ts

有时我的项目有效,我不明白是什么问题。有人可以帮我解决这个问题,请

这是我的app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule,ReactiveFormsModule }   from '@angular/forms';
import { HttpModule }    from '@angular/http';
import { MdCoreModule } from '@angular2-material/core';
import { MdButtonModule } from '@angular2-material/button';
import { MdButtonToggleModule } from '@angular2-material/button-toggle';
import { MdCardModule } from '@angular2-material/card';
import { MdRadioModule } from '@angular2-material/radio';
import { MdCheckboxModule } from '@angular2-material/checkbox';
import { MdTooltipModule } from '@angular2-material/tooltip';
import { MdInputModule } from '@angular2-material/input';
import { MdToolbarModule } from '@angular2-material/toolbar';
import { MdTabsModule } from '@angular2-material/tabs';
import { MdSidenavModule } from '@angular2-material/sidenav';
import { MdProgressCircleModule } from '@angular2-material/progress-circle';
import { AppComponent } from './app.component';
import "hammerjs";
import { routing,  appRoutingProviders } from './app.routes';
import {RouterModule} from '@angular/router';
import { DashboardComponent } from './dashboard/dashboard.component';
import { IndexComponent } from './index/index.component';
import { LoginComponent } from './login/login.component';
import { NotFoundComponent } from './not-found/not-found.component';
import { IndexService }          from './services/index.service';
import { HttpClient }          from './services/http.client';
import { AuthenticationService }   from './services/authentication.service';
import { AuthGuard } from './_guard/auth-guard';
import { ErrorMessageComponent } from './error-message/error-message.component';

import { MenuComponent } from './menu/menu.component';
import { PageAnalysisComponent } from './page-analysis/page-analysis.component';
import { SettingsComponent } from './settings/settings.component';
import { SiteVsSiteComponent } from './site-vs-site/site-vs-site.component';
import { SidenavComponent } from './sidenav/sidenav.component';
import { SitesListComponent } from './sites-list/sites-list.component';
import { SeoOverviewComponent } from './seo-overview/seo-overview.component';
import { AnalysisContentComponent } from './analysis-content/analysis-content.component';
import { DesignComponent } from './design/design.component';
import { PerformanceComponent } from './performance/performance.component';
import { CheckerComponent } from './checker/checker.component';
import { Loading } from './loading/loading.component';
import { TRANSLATION_PROVIDERS, TranslatePipe, TranslateService }   from './translate';
import { ChartModule } from 'angular2-highcharts';
import {FacebookService} from 'ng2-facebook-sdk/dist';
import { MdUniqueSelectionDispatcher } from '@angular2-material/core';
import { FormBuilder, Validators} from '@angular/forms';
import { AccessibilityComponent } from './accessibility/accessibility.component';
import { SummaryComponent } from './summary/summary.component';
import { CloudComponent } from './cloud/cloud.component';
import { RemoveSpacesPipe } from './remove-spaces.pipe';
import { ActivationComponent } from './activation/activation.component';

@NgModule({
  declarations: [
    AppComponent,
    DashboardComponent,
    IndexComponent,
    LoginComponent,
    NotFoundComponent,
    ErrorMessageComponent,
    MenuComponent,
    PageAnalysisComponent,
    SettingsComponent,
    SiteVsSiteComponent,
    SidenavComponent,
    SitesListComponent,
    SeoOverviewComponent,
    AnalysisContentComponent,
    DesignComponent,
    PerformanceComponent,
    CheckerComponent,
    TranslatePipe,
    AccessibilityComponent,
    SummaryComponent,
    CloudComponent,
    RemoveSpacesPipe,
    Loading,
    ActivationComponent
  ],

  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    RouterModule,
    routing,
    MdCoreModule,
    MdCardModule,
    MdButtonModule,
    MdRadioModule,
    ChartModule,
    MdCheckboxModule,
    MdTooltipModule,
    MdInputModule,
    MdToolbarModule,
    MdButtonToggleModule,
    MdTabsModule,
    MdSidenavModule,
    MdProgressCircleModule,
    MdRadioModule,
    ReactiveFormsModule
  ],
  providers: [appRoutingProviders,
              FacebookService,
              IndexService,
              TRANSLATION_PROVIDERS,
              TranslateService,
              AuthenticationService,
              MdUniqueSelectionDispatcher,
              FormBuilder,
              Validators,
              AuthGuard,
              HttpClient
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}

0 个答案:

没有答案