Javascript Internet explorer 11 Angularjs+;NodeJS+;猫鼬问题
我正在用Angularjs框架在前端、nodejs后端和mongoose开发我的网站,以将我的数据保存到MongoDB数据库中 在FirefoxRSV.24和chrome中,当我向数据库中添加一个用户时,这个新用户将自动显示在我的列表网格中 但在IE 11中,直到我关闭浏览器并将其打开后,它才会出现 添加新配置文件时,我在控制器中执行以下操作:Javascript Internet explorer 11 Angularjs+;NodeJS+;猫鼬问题,javascript,internet-explorer,angularjs,Javascript,Internet Explorer,Angularjs,我正在用Angularjs框架在前端、nodejs后端和mongoose开发我的网站,以将我的数据保存到MongoDB数据库中 在FirefoxRSV.24和chrome中,当我向数据库中添加一个用户时,这个新用户将自动显示在我的列表网格中 但在IE 11中,直到我关闭浏览器并将其打开后,它才会出现 添加新配置文件时,我在控制器中执行以下操作: $scope.AddProfil = function() { $http.post('/ajouterProfils', $scop
$scope.AddProfil = function() {
$http.post('/ajouterProfils', $scope.profil)
.success(function(data) {
$scope.profilFlag = data; /*unit tests*/
$scope.lastDocId = data._id;
$scope.ajouterProfilTag($scope.lastDocId);
$scope.profil = {};
$scope.tagStyles.length = 0;
$scope.tagStyles = [];
$scope.colorList = {};
angular.element($('.shown-text-add').text($('.shown-text-add').text()));
angular.element($('.shown-text-add').css('font-family', ''));
angular.element($('.shown-text-add').css('font-size', ''));
angular.element($('.shown-text-add').css('line-height', ''));
angular.element($('.shown-text-add').css('font-weight', ''));
setTimeout( function(){$('#addPanel').show();} );
setTimeout( function(){$('#addPanel').fadeOut();}, 2500);
});
};
在我的刀中,我有:
/**
* Add a profile
*/
exports.createProfile = function(req, res) {
var profile = new Profil(req.body);
profile.save(function(err) {
if (err) {
return res.send('users/signup', {
errors: err.errors,
profile: profile
});
} else {
res.jsonp(profile);
}
});
};
有什么想法吗?反馈 如前所述,使用and而不是DOM操作。
很明显,这是您的问题,因为您在重新加载浏览器时说数据在那里,所以问题不在于服务器端组件。没有任何代码,无法尝试和帮助。您应该使用指令操作DOM,而不是在控制器中操作。