angularjs - angular link. What is # and what does it do? -


i working through ca angular course. had question code:

<div class="main">   <div class="container">      <h2>recent photos</h2>     <div class="row">       <div class="item col-md-4" ng-repeat="photo in photos">         <a href="#/photos/{{$index}}">           <img class="img-responsive" ng-src="{{ photo.url }}">           <p class="author">by {{ photo.author }}</p>         </a>       </div>     </div>    </div> </div> 

in

so when click photo, angular knows it's index , index gets relayed photocontroller routeparams right , can access via $routeparams.id. #?

# used in called hash navigation separate section of url's elements. hash navigation used angular interior hash routing rather full page routing.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -