我有一个使用angular Universal的Angular 6.03项目,它被部署到firebase。直到几天前,一切都运行得很好,但上次我部署的时候,我开始得到未定义错误的“根”属性“无法读取”。
error: TypeError: Cannot read property 'root' of undefined
at new rootRoute (/Users/rebekahapelt/Projects/hapkido-website/functions/node_modules/@angular/router/bundles/router.umd.js:5390:35
我遵循了Angular Universal的指南:服务器端渲染,就像Angular:的官方文档中所解释的那样。我设法正确地运行了应用程序,有了两个包,浏览器和服务器包。我也遵循了视频中的步骤: Angular Universal和Firebase托管。我还关注了视频:使用TypeScript的Firebase云函数入门。我使用angular-universal-express-firebase模块在firebase函数中运行应用程序,当我运行函数的firebase服务时,我得到了这个错误:
TypeError: readFile$(...).mergeMap is not a function
我的代码有问题。我在一个离子项目中使用Firebase函数(带有类型记录)。当我运行"firebase serve“时,我的函数可以工作,我可以得到数据,但是当我以离子型语言导出我的函数时,我有以下错误:
未明错误:响应丢失数据字段。在新的HttpsErrorImpl (index.cjs.js:58)的服务。(index.cjs.js:553)在step (tslb.es6.js:100) at Object.next (tslb.es6.js:81) at ZoneDelegate.invoke (zone-evergreen.js:359) at Object.onInvoke
试图使用键/值映射来确定是否应该显示角控制元素:
但我收到一个例外:
angular.js:6173 TypeError: fnPtr is not a function
at Object.elementFns [as get] (angular.js:6802)
at Object.$get.Scope.$digest (angular.js:8563)
at Object.$get.Scope.$apply (angular.js:8771)
at angular.js:986
at Object.invoke (angular.js:2873)
我正在尝试学习如何创建自定义服务。当我关注ES6时,我使用了胖箭头。
app.service('randNumGenerator', () => {
let randNum = Math.ceil(Math.random()*100);
this.generate = () => randNum;
});
当我为这个匿名函数使用胖箭头时,它会导致一个错误
angular_v1.7.9.js:15570 TypeError: Function.prototype.bind.apply(...) is not a constructor
at O
我试图在我的控制器中使用角cookie,但是由于某些原因,它总是没有定义:
MyApp.controller('ValidationController', ["$cookies", function($cookies) {
debugger; //checking $cookies here return an object
$cookies.put("test","test"); //trying to add value to the cookie here return TypeError: undefin
我似乎在将MFP混合(没有cordova)应用程序和angular 1.5结合起来时遇到了问题。同样的应用程序在angular 1.4.9上运行得很好,但是如果我切换到angular1.5,我会得到这个错误:
Error: [$injector:modulerr] Failed to instantiate module ng due to:
TypeError: Cannot set property 'aHrefSanitizationWhitelist' of null
at $$SanitizeUriProvider (http://localhost:10080/Hy
在本地开发Google云功能。试图测试调用Firestore的函数。下面是一个很小的例子。
模拟器正在运行。
当从浏览器调用函数addMessage()时,它工作得非常好。
在从测试中调用错误TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string.时,该函数会失败。
问题:为什么会发生此错误,以及如何从测试中成功地调用Firestore函数?
函数/index.js:
require ('dotenv').config();
const f
我有一个文本输入字段,我不希望用户允许在tickts下已经出现的单词( inSensitiviness)
我试过用
var value = val.toUpperCase();
控制台下的异常
VM226 angular.js:6173 TypeError: Cannot read property 'toUpperCase' of undefined
at Child.$scope.checkQuestions (VM227:78)
at Object.get (VM226 angular.js:6801)
at Object.$digest (VM2
我已经尝试过同样的方法,在消防文档中给出。但这是我遇到的错误。
functions: Failed to load functions source code. Ensure that you have
the latest SDK by running **npm i --save firebase-functions** inside the
functions directory.
functions: Error from emulator. FirebaseError: Error occurred while
parsing your function triggers