我正在尝试用ngAnimate做一些动画,但我甚至无法开始使用它.问题是,当我尝试将我的ngAnimate依赖项添加到app文件时,它会在控制台中抛出此错误,而我的应用程序无效.
Uncaught Error: [$injector:unpr] Unknown provider: $$jqLiteProvider <- $$jqLite <- $animate <- $compile
http://errors.angularjs.org/1.3.5/$injector/unpr?p0=%24%24jqLiteProvider%20%3C-%20%24%24jqLite%20%3C-%20%24animate%20%3C-%20%24compileangular.js:63 (anonymous function)angular.js:3950 (anonymous function)angular.js:4097 getServiceangular.js:3955 (anonymous function)angular.js:4097 getServiceangular.js:4129 invokeangular.js:4025 origProvider.$getangular.js:4138 invokeangular.js:3956 (anonymous function)angular.js:4097 getServiceangular.js:4129 invokeangular.js:3956 (anonymous function)angular.js:4097 getServiceangular.js:4129 invokeangular.js:1435 doBootstrapangular.js:1455 bootstrapangular.js:1349 angularInitangular.js:25912 (anonymous function)angular.js:2722 triggerangular.js:2992 eventHandler
Run Code Online (Sandbox Code Playgroud)
但是,如果不添加ngAnimate依赖项,它的工作正常.不知道我在这里做错了什么.
这是我的app.js.
var app = angular.module('myApp', ['ngRoute','ngAnimate']);
app.config(function($routeProvider) {
$routeProvider
.when('/home', {
controller: 'homeCtrl',
templateUrl: '/partials/home.html'
})
.when('/register', {
controller: 'regCtrl',
templateUrl: '/partials/register.html'
})
.when('/login', {
controller: 'loginCtrl',
templateUrl: '/partials/login.html'
}).when('/', {
redirectTo: '/home'
}).otherwise({
redirectTo: '/register'
});
});
Run Code Online (Sandbox Code Playgroud)
这是我的HTML …
我使用Firebase $authWithPassword方法进行用户登录.我使用该$createUser方法为我的用户创建注册,并在成功时更新我/ users/path上的条目以保存用户名,uid和其他一些细节.这是代码
var myDataRef = new Firebase(baseURL + 'datalog/');
var refObj = $firebaseAuth(myDataRef);
refObj.$createUser({
email: $scope.emailId,
password: $scope.password
}).then(function(userData) {
var UserUniqueUrl = new Firebase(baseURL + 'users/' + userData.uid + '/');
UserUniqueUrl.set({
'email': $scope.emailId,
'username': $scope.username,
'uid': userData.uid,
'theme': 'default'
}, function(error) {
if (error) {
console.log(error);
} else {
console.log('Successfully updated in user table');
}
});
}).catch(function(error) {
if (error.code == 'EMAIL_TAKEN') {
$scope.regStatusError = 'Email already registered!';
} else {
$scope.regStatusError = 'Unable to …Run Code Online (Sandbox Code Playgroud) 嗨,我正在尝试使用PHP集成第一个数据支付网关集成在soap请求方法中.我已经从第一个数据下载了工作示例代码,但是当我尝试使用示例代码提交付款时,他们给了我一个错误.
整个PHP代码是
<?php
class SoapClientHMAC extends SoapClient {
public function __doRequest($request, $location, $action, $version, $one_way = NULL) {
global $context;
$hmackey = "***********************"; // <-- Insert your HMAC key here
$keyid = "*****"; // <-- Insert the Key ID here
$hashtime = date("c");
$hashstr = "POST\ntext/xml; charset=utf-8\n" . sha1($request) . "\n" . $hashtime . "\n" . parse_url($location,PHP_URL_PATH);
$authstr = base64_encode(hash_hmac("sha1",$hashstr,$hmackey,TRUE));
if (version_compare(PHP_VERSION, '5.3.11') == -1) {
ini_set("user_agent", "PHP-SOAP/" . PHP_VERSION . "\r\nAuthorization: GGE4_API " . $keyid . ":" . $authstr …Run Code Online (Sandbox Code Playgroud) 所以我在Firebase Cloud Firestore中有这样的记录:
[
{
"category":"drinks",
"expensetype":"card",
"id":"5c673c4d-0a7f-9bb4-75e6-e71c47aa8d1d",
"name":"JJ",
"note":"YY",
"price":57,
"timestamp":"2017-11-30T22:44:43+05:30"
},
{
"category":"drinks",
"expensetype":"card",
"id":"85731878-eaed-2740-6802-e35e7758270b",
"name":"VV",
"note":"TTT",
"price":40,
"timestamp":"2017-12-30T22:41:13+05:30"
}
]
Run Code Online (Sandbox Code Playgroud)
我想用时间戳查询数据并获取属于特定月份或日期的数据。
例如,如果我单击日历中的特定月份(例如3月),则结果中只需要该特定月份的数据。我怎样才能做到这一点?
我已使用保存日期
firebase.firestore.FieldValue.serverTimestamp()
在此先感谢您的帮助。
编辑:
这就是我形成查询的方式
var spendsRef = this.db.collection('spend', ref => ref.where("timestamp", ">", "12-12-2017"));
this.items = spendsRef.valueChanges();
Run Code Online (Sandbox Code Playgroud)
但是它仍然返回我数据库中的所有数据
答:
var todayDate = new Date("Tue Jan 02 2018 00:00:00 GMT+0530 (IST)") // Any date in string
var spendsRef = this.db.collection('spend', ref => ref.where("timestamp", ">", todayDate));
this.items = spendsRef.valueChanges();
Run Code Online (Sandbox Code Playgroud)