gpt4 book ai didi

angularjs - 使用 IE8 嵌套 Angular View

转载 作者:行者123 更新时间:2023-12-01 22:31:47 25 4
gpt4 key购买 nike

TLDR:

示例:http://plnkr.co/edit/NeUWHh?p=preview

IE8 控制台出现错误:TypeError: 'childNodes' 为 null 或不是 undefined object

看起来很简单,适用于任何 webkit 浏览器,也适用于 IE 9 以上,但在 IE8 上会中断并显示内部 View 的 uc 编译形式(带有大括号和字段名称)。

我的确切代码,与示例代码不同:

jobgrid.html:

<div class="jobContainer">  
<div class="largeBlock">
<div>
<div class="access clicks">
<a href="#/jobs/{{job.id}}"><h5 class="hasLabel" data-ng-bind="job.title"></h5></a>
<span class="miniLabel" restrict access="admin recruiter"><a href="#/editJob/{{job.id}}">Edit</a></span>

</div>
</div>
<div class="section" data-ng-bind="job.department.name">

</div>
<div class="section" data-ng-bind="job.locations[0].name">

</div>
</div>
<div class="smallBlock">

<div class="access" restrict access="recruiter admin">
<div class="section enlarged">
<a href="#/applicants?job={{job.id}}" data-ng-bind="job.job_stats.applicants_count.total"></a>
</div>
<div class="section">
Applicants
</div>
</div>

<div class="access" restrict access="scouter">
<div class="section enlarged">
<a href="#/applicants?job={{job.id}}" data-ng-bind="job.job_stats.applicants_count.referred"></a>
</div>
<div class="section">
Applicants
</div>
</div>

</div>
<div class="smallBlock">
<div class="access" restrict access="scouter recruiter admin">
<div class="section enlarged">
<a href="#/views/{{job.id}}">0</a>
</div>
<div class="section">
Views
</div>
</div>
</div>
<div class="smallBlock buttons">
<!-- only if the company allows public distribution -->
<div class="access" restrict access="scouter recruiter admin">
<div class="section">
<input type="button" class="tiny button" data-ng-click="layout.toggleShareSection(job.id)" value="Share">
</div>
<div class="section">
<input type="button" class="tiny button" data-ng-click="layout.toggleReferSection(job.id)" value="Refer">
</div>
</div>
</div>
<div class="largeBlock">
<!-- only if the company allows public distribution -->
<div class="section enlarged top" data-ng-bind="job.reward">

</div>
<div class="section enlarged date">
<i class="foundation-star" data-ng-bind="job.modified | date:'d, MMM'"></i>
</div>
</div>
</div>
<hr>

dash.html:

<div class="metaContainer" data-ng-controller="dashCtrl" data-ng-cloak>
<h1>{{model.title}}</h1>
<div class="topbox">
<div class="topboxSection">
</div>
<div class="topboxSection">
<div class="topboxSubSectionLarge">
<a class="small button">Share all jobs</a>
</div>
<div class="topboxSubSectionLarge">
<a class="small button">Copy my job link</a>
</div>
</div>
</div>
<div class="topbox">
<div class="topboxSection">
<div class="topboxSubSectionLarge">
<select data-ng-model="model.formData.location_id" data-ng-options="id as name for (id, name) in model.locationsList()">
<option value=''>Location</option>
</select>
</div>
<div class="topboxSubSectionLarge">
<div class="wideFieldContainer">
<select data-ng-options="id as name for (id, name) in model.departmentsList()"
data-ng-model="model.formData.department_id">
<option value=''>Department</option>
</select>
</div>
</div>
<div class="topboxSection">
</div>
</div>

<div class="innerContainer">
<hr>
<div data-ng-repeat="job in model.myJobs()" data-ng-cloak>
<div data-ng-include src="'partials/jobgrid.html'"></div>
</div>
</div>
</div>
</div>

最佳答案

你也可以更新你的脚本文件吗..

使用这个

<html xmlns:ng="http://angularjs.org">
<head>
<!--[if lte IE 7]>
<script src="/path/to/json2.js"></script>
<![endif]-->
</head>
<body>
...
</body>
</html>

IE 8 Fix

如果您使用 $http.delete api 调用,请将其替换为 $http["delete"]

关于angularjs - 使用 IE8 嵌套 Angular View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18814132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com