视觉工作室的离子2构建错误

时间:2016-10-31 18:25:42

标签: visual-studio angular ionic2

我将我的离子2应用程序导入了visual studio。在我这样做之前,没有任何构建错误但是,知道它给了我以下错误;

enter image description here

这是我的firm.ts文件;

import { Component } from '@angular/core';
import { FirmService } from '../../providers/getFirms';
import { Observable } from 'rxjs/Rx';
import {ReportsPage} from '../report/report';
import { Auth } from '../../providers/auth';
import {LoginPage} from '../login-page/login-page';
import { NavController, ModalController, AlertController, LoadingController,NavParams } from 'ionic-angular';
import {
  FormGroup,
  FormControl

} from '@angular/forms';

/*
  Generated class for the Firms page.

  See http://ionicframework.com/docs/v2/components/#navigation for more info on
  Ionic pages and navigation.
*/
@Component({
  selector: 'page-firms',
  templateUrl: 'firms.html'
})
export class FirmsPage {
  langs;
  langForm;
  loading: any;
  username : string;
  firms: string[];


  constructor(public navCtrl: NavController, private navParams: NavParams, public firmService: FirmService, public loadingCtrl: LoadingController, public authService: Auth) {
     this.getFirms();
     this.username = this.navParams.get("param");
     this.langForm = new FormGroup({
      "langs": new FormControl('')
    });
  }

怎么能找不到它们。我想,我导入了正确的路径。

3 个答案:

答案 0 :(得分:0)

可能您没有采用这些提供商的正确名称。请记住,您必须引用类名。

export class AuthService { }

答案 1 :(得分:0)

两者似乎都与供应商路线有关,您是否100%确定其正确无误?如果您可以制作一个jsfiddle或链接到回购,那么回答您的问题会更容易。

答案 2 :(得分:0)

1 - 安装 npm https://nodejs.org

2 - 安装 typescript npm install -g typescript

3 - 更改VS中的设置以首先使用PATH,这是安装npm时的主要问题,VS现在自带嵌入式npm。

Tools -> Options -> Projects and Solutions -> External Web Tools

选择 $(PATH),然后使用箭头(右上角)将PATH移动到第一行。

相关问题