UKb*_*und 7 angularjs ionic-framework ionic2 angular
我在尝试查看Ionic2应用程序时遇到此错误.我试图在我的应用程序中实现天气应用程序.我不确定这是否导致错误.
我不确定错误来自哪里,所以我不确定要发布哪个代码,所以,如果您需要查看某些代码,请告诉我.
找不到模块"@ angular/core/src/metadata/directives"
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import firebase from 'firebase';
import { firebaseConfig } from './credentials';
import { HomePage } from '../pages/home/home';
import { Unsubscribe } from '@firebase/util';
import {MenuPage} from '../pages/menu/menu';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage: any;
constructor(
platform: Platform,
statusBar: StatusBar,
splashScreen: SplashScreen
) {
firebase.initializeApp(firebaseConfig);
const unsubscribe: Unsubscribe = firebase.auth().onAuthStateChanged(user => {
if (user) {
this.rootPage = HomePage;
unsubscribe();
} else {
this.rootPage = 'LoginPage';
unsubscribe();
}
});
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
}
}
Run Code Online (Sandbox Code Playgroud)
Saj*_*ran 12
Deep imports 不支持,因为我在上面的评论中提到,更改
从
import {Input} from '@angular/core/src/metadata/directives';
Run Code Online (Sandbox Code Playgroud)
至
import {Input} from '@angular/core';
Run Code Online (Sandbox Code Playgroud)