【发布时间】:2017-11-29 05:41:09
【问题描述】:
我正在使用 mean.js 样板。我想在我的客户端包含angular-stripe。为此,我安装了 angular-stripe,它在 node_modules 下可用。
现在我想将它添加到我的代码中,如下所示
(function () {
'use strict';
angular
.module('myApp', [
'angular-stripe'
])
.config(function (stripeProvider) {
stripeProvider.setPublishableKey('my_key')
})
PaymentController.$inject = ['$scope', '$state', 'Authentication', 'Socket', 'stripe'];
function PaymentController($scope, $state, Authentication, Socket, stripe) {
var vm = this;
}
());
它会抛出以下错误
Module 'angular-stripe' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
【问题讨论】:
-
在加载主 app.js 之前是否包含了 angular-stripe 插件?
-
亲爱的,首先检查您的项目中是否包含插件 angular-stripe 和 .js 文件。
标签: angularjs mean-stack meanjs