I'm trying to integrate AngularJs to a existing web project(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. 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.
There are three main choices for AngularJS:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.