[英]AngularJs project not working as a single page web app
I'm trying to integrate AngularJs to a existing web project(jquery). 我正在尝试将AngularJs集成到现有的Web项目(jquery)。 This is a part of my code : 这是我的代码的一部分:
<div class="medya" ng-repeat="d in data" masonry-item-dir>
<a href="{{d.Url}}" class="onizleme"><img src="{{d.Image}}" alt="Içerigin Basligi" data-src="{{d.Image}}" srcset="{{d.Image}} 1x, {{d.Image}} 2x"></a>
<div class="govde">
<a href="{{d.Url}}" class="baslik">{{d.Title}}</a>
<div class="bilgi"><a href="{{d.Url}}" class="lnk">{{d.EditorName}}</a> <span data-title="{{d.DateCreated}}" class="tooltip">{{d.CreateDate}}</span></div>
<div class="aciklama">{{d.Content}}</div>
<div class="alt">
<span class="damga" title="{{d.ReadCount}} Görüntüleme"><span class="icon-eye"></span>{{d.ReadCount}}b</span>
<a class="imle tooltip aktif" href="{{d.Url}}"><span class="icon-bookmark"></span></a>
</div>
</div>
</div>
This is not working as a single page application, it sends a new request and opens a new page everytime a link is clicked. 它不能用作单页应用程序,它会发送新请求并在每次单击链接时打开一个新页面。 I guess it's because of the a href="{{d.Url}}"
parts I'm using. 我猜是因为我正在使用a href="{{d.Url}}"
部分。 How can I change it in order to make it a single page site? 如何更改它以使其成为单个页面的网站?
A single page application needs to be able to change pages "internally". 单个页面应用程序需要能够“内部”更改页面。 This is usually handled by a router
module. 这通常由router
模块处理。
There are three main choices for AngularJS: AngularJS有三个主要选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.