小编sac*_*hik的帖子

Ionic 2 karma测试失败'ion-label'不是已知元素

在运行npm测试时,我的组件上出现此错误 - >

  **Can't bind to 'formGroup' since it isn't a known property of 
   'form'. 
   ("
  </div>
<form [ERROR ->][formGroup]="loginForm" text-center>
<ion-list>
"): ng:///DynamicTestModule/Login.html@18:6
'ion-label' is not a known element:
1. If 'ion-label' is an Angular component, then verify that it is part 
of this module.
2. If 'ion-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' 
to the '@NgModule.schemas' of this component to suppress this message. 
 ("
<ion-item>
    [ERROR ->]<ion-label floating>Email</ion-label>
    <ion-input type="email" formControlName="email" [class.inva"): 
 ng:///DynamicTestModule/Login.html@25:4
'ion-input' is not a …
Run Code Online (Sandbox Code Playgroud)

unit-testing karma-jasmine ionic-framework ionic2 angular

5
推荐指数
1
解决办法
1677
查看次数

错误:未捕获(承诺):错误:没有GoogleMaps的提供商

我正在使用离子框架,但在集成谷歌地图时,我收到此错误:错误:未捕获(在承诺中):错误:没有GoogleMaps提供商!

这是我的地图类:

     import { Component,ViewChild } from '@angular/core';
      import { NavController,Platform } from 'ionic-angular';
      import { App, MenuController } from 'ionic-angular';
     import {
     GoogleMaps,
    GoogleMap,
    GoogleMapsEvent,   LatLng,
   CameraPosition,
  MarkerOptions,
  Marker
 } from '@ionic-native/google-maps';
 import { HttpModule } from '@angular/http';
 import { NgModule } from '@angular/core';



  @NgModule({
 imports: [
  HttpModule
]})
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {

 map: GoogleMap;
 constructor(public platform: Platform,public navCtrl: 
     NavController,app: App, menu: MenuController,private googleMaps: 
       GoogleMaps) {

     menu.enable(true);
        platform.ready().then(() => {
        this.loadMap();
          });

      } …
Run Code Online (Sandbox Code Playgroud)

node.js typescript ionic-framework angular

4
推荐指数
1
解决办法
8564
查看次数