有了一個全新的Windows安裝流星的和最簡單的包,我越來越AccountsTemplates沒有定義
ReferenceError: AccountsTemplates is not defined
我試圖使用postSignUpHook功能,像這樣 (在基本目錄中嘗試以及/服務器/)
AccountsTemplates.configure({
postSignUpHook: myPostSubmitFunc
});
var myPostSubmitFunc = function(userId, info) {
console.log("new user " + userId);
}
這裏是已使用流星安裝版本上安裝
meteor list
accounts-base 1.2.2 A user account system
accounts-password 1.1.4 Password support for accounts
accounts-ui 1.1.6 Simple templates to add login widgets to an app
alanning:roles 1.2.15 Authorization package for Meteor
blaze-html-templates 1.0.1 Compile HTML templates into reactive UI with
Meteor Blaze
ecmascript 0.1.6* Compiler plugin that supports ES2015+ in all
.js files
es5-shim 4.1.14 Shims and polyfills to improve ECMAScript 5
support
insecure 1.0.4 (For prototyping only) Allow all database
writes from the client
jquery 1.11.4 Manipulate the DOM using CSS selectors
meteor-base 1.0.1 Packages that every Meteor app needs
mobile-experience 1.0.1 Packages for a great mobile user experience
mongo 1.1.3 Adaptor for using MongoDB and Minimongo over
DDP
session 1.1.1 Session variable
standard-minifiers 1.0.2 Standard minifiers used with Meteor apps by
default.
tracker 1.0.9 Dependency tracker to allow reactive callbacks
從我可以告訴AccountsTemplates假設來自帳戶基地,但我很難找到它創建的位置。
另外如果我沒有記錯的話,當你得到像這樣的引用錯誤時,它可能是一個不兼容的軟件包與其他地方無關的問題?我怎麼去調試這裏發生的事情?
您需要使用'useraccounts:鐵routing'或'useraccounts :flow-routing'包,以便使用'AccountsTemplates'。 [參考文獻](https://github.com/meteor-useraccounts/core/blob/master/Guide.md#routing)。 –