gpt4 book ai didi

javascript - 未知的 AngularJS 错误(我是初学者)

转载 作者:行者123 更新时间:2023-11-30 16:37:08 24 4
gpt4 key购买 nike

好的,我不知道怎么问这个问题,所以我要解释一下。我有一个淡入淡出的模型,可以在与模型相同的页面上阅读我的条款和条件。我已将模型的 URL 指定为 t_and_c_m ( <a href="/t_and_c_m"> )。淡入效果完美。但是给我一个错误,它找不到 URL。没错,因为我没有单独的条款和条件 html 文件。如何使用 angularjs 修复此错误。

这里是 html 代码:signup.html

<div class="row">
<div class="col-xs-4 col-sm-3 col-md-3">
<span class="button-checkbox">
<button type="button" class="btn" data-color="info" tabindex="7">I Agree</button>
<input type="checkbox" name="t_and_c" id="t_and_c" class="hidden" value="1">
</span>
</div>
<div class="col-xs-8 col-sm-9 col-md-9">
By clicking <strong class="label label-primary">Register</strong>, you agree to the <a href="/t_and_c_m" data-toggle="modal" data-target="#t_and_c_m">Terms and Conditions</a> set out by this site, including our Cookie Use.
</div>
</div>

<hr class="colorgraph" />
<div class="row">
<div class="col-xs-12 col-md-6"><input type="submit" value="Register" class="btn btn-primary btn-block btn-lg" tabindex="7"></div>
</div>

接下来是我的条款和条件模型在同一页面 (signup.html)

<div class="modal fade" id="t_and_c_m" tabindex="-1" role="dialog" aria-labelledby="myModelLabel" aria-hidden="true">
<div class="modal-dialog model-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
<h4 class="modal-title" id="myModalLabel">Terms & Conditions</h4>
</div>
<div class="modal-body">
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
<p>Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions, Terms & conditions</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">I Agree</button>
</div>
</div>
</div>
</div>

最后是我的应用:app.js

$routeProvider
.when('/t_and_c_m',
{
activatetab: '#t_and_c_m'
});

错误是找不到 t_and_c_m URL。即使我删除代码应用程序,仍然显示错误。需要帮忙。

引用示例:http://bootsnipp.com/snippets/featured/mix-amp-match-register

最佳答案

不要在 url 中使用下划线。

why should I not use underscore

所以,我认为删除下划线和使用破折号不会导致错误。

关于javascript - 未知的 AngularJS 错误(我是初学者),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32560805/

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