"firebase" 未在生成器中定义-gulp-angular
"firebase" is not defined in generator-gulp-angular
我正在使用 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
能否请您指出我哪里出错了。
确保将 firebase
服务注入控制器
我正在使用 generator-gulp-angular
我用
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
能否请您指出我哪里出错了。
确保将 firebase
服务注入控制器