【发布时间】:2016-03-07 23:57:16
【问题描述】:
我为自己创建了一个投资组合网站。我使用 angular.js 来显示我的“关于我”文本内容以及我的投资组合图像和内容。即使在重新加载网站后,它也可以在我家的每台计算机上完美运行。截至上周,我收到报告说它在某些计算机上不起作用。我很难确定这是托管问题还是我的问题,因为报告它不工作的人一周前没有遇到这个问题,此后我没有更新它。
链接是http://www.davidsandersdesigns.com/。我觉得我在盲目地进行故障排除,因为即使在我的缓存被清空后,我的所有浏览器和机器上的一切都运行良好。我有时会收到 401 错误。有时我没有。请帮忙!
这是我的 json 文件。
{
"aboutMeContent": {
"paragraph1": "My name is David A. Sanders. I am a front-end web developer and graphic designer. I am fresh out of school and currently looking for a job where I may apply my skills, be challenged, and learn new things. I love design, creativity, web animation, ones/zeros, learning, french-pressed coffee, and my beautiful family…..did I mention my family? They are the reason I decided to pursue web development after all.",
"paragraph2": "Aside from wrestling midgets (my kids), changing diapers, and day dreaming…..My top technical skills are HTML5, CSS3, JavaScript, Velocity.js, jQuery, and web animation. My top design skills are Photoshop, Illustrator, and just simple pencil and paper."
},
"portTileContent": [{
"name": "Charlottes 3rd Birthday",
"type": "Graphic Design/Print",
"skills": "Adobe Illustrator",
"notes": "This is a birthday card I created for my beautiful daughter. Picture courtesy of Photographer Carly Miller.",
"link":"",
"image": "images/viewerImages/CharBdayCard3yr_viewerImage.png"
}, {
"name": "domSpace Animation Project",
"type": "Web Design/Animation",
"skills": "HTML5, CSS3, Velocity.js, Object-Oriented Javascript, Illustrator",
"notes": "An Animation project I created to practice my programming skills.",
"link": "<strong>Link:</strong> Visit the link <a href='http://www.davidsandersdesigns.com/domspace/' target=_blank>here<\/a>",
"image": "images/viewerImages/domSpaceImage_viewerImage.png"
}, {
"name": "Something Stiched Something Sewn",
"type": "Graphic Design/Print",
"skills": "Adobe Illustrator",
"notes": "A business card I created for Donna Pierce/Seamstress.",
"link": "<strong>Link:</strong> Visit her facebook <a href='https://www.facebook.com/SomethingStichedSomethingSewn/?fref=ts' target=_blank>here<\/a>",
"image": "images/viewerImages/somethingStiched_viewerImage.png"
}, {
"name": "davidsandersdesigns.com build 2000",
"type": "Web Design/My Portfolio Site",
"skills": "HTML5, SASS, Bootstrap3, Angular.js, Velocity.js, Illustrator, Photoshop",
"notes": "My Personal site to showcase my work.",
"link": "<strong>Link:</strong> You are already here!",
"image": "images/viewerImages/dsdesignsBuild2000_viewerImage.png"
}]
}
这是我的控制器文件。
app.controller('myCtrl', function($scope, $http) {
$http.get("http://www.davidsandersdesigns.com/angular.js/data.json").success(function(data) {
$scope.aboutMe = data.aboutMeContent;
$scope.portTileSpecs = data.portTileContent;
});
});
这是我的应用文件
var app = angular.module('myApp', []);
angular.module('myApp')
.filter('to_trusted', ['$sce', function($sce){
return function(text) {
return $sce.trustAsHtml(text);
};
}]);
【问题讨论】:
-
401 是未经授权的消息。听起来更像是服务器配置问题或未显示授权代码。您对任何目录都有密码保护吗?
-
尝试清除您的 cookie,您可能能够重现
-
我只是检查以确保,所以我不知道。它在你的机器上运行吗?
-
我有多次。我有朋友试用他们的机器。有些可以,有些不能。以前没有人在他们的机器上启动过该站点。这让我大吃一惊。但这似乎不是浏览器问题,因为它已在 chrome、IE、Firefox 和 safari 中运行
-
为我在 Firefox 中工作。尝试隔离哪些浏览器出现错误
标签: javascript angularjs cross-browser