我使用generator-gulp-angular,我添加了firebase和angularfire
bower install firebase --save
bower install angularfire --save然后我在模块中添加了firebase,如下所示。
angular.module('myApp', ['firebase']然后在MainController中,我定义了配置并进行了初始化,如下所示。
vm.config = {
apiKey: "yuygjgjhghjguyfuyfuyccncvcn",
authDomain: "hjgjhghjghjg.firebaseapp.com",
databaseURL: "https://hjghjgjhghj.firebaseio.com"
};
function activate() {
getWebDevTec();
getMenu();
firebase.initializeApp(vm.config);
$timeout(function() {
vm.classAnimation = 'rubberBand';
}, 4000);
}当我做gulp serve的时候,但是我得到了错误。
29:7 error "firebase" is not defined no-undef你能告诉我哪里出错了吗?
https://stackoverflow.com/questions/38154972
复制相似问题