angular.js - Problems with the default address bar of ui-sref
大家讲道理
大家讲道理 2017-05-15 17:08:28
0
1
532

I was looking at a small example of angular bookstore by Teacher Da Mo, and found a problem when implementing ui-sref

<a ui-sref="booklist({bookType:0})" class="list-group-item">计算机</a>

At this time, the address bar displays something like http://localhost:8080/#/0
and another line of code

<a ui-sref="bookdetail({bookId:row.getProperty(col.field)})" id="{{row.getProperty(col.field)}}">详情</a>

The display is like this http://localhost:8080/#/bookd...

So my question is why the booklist in the ui-sref in the above line is omitted in the address bar, but the details can be

I checked some official documents of ui-router about the $state.href method. Examples are as follows:
expect($state.href("about.person", { person: "bob" })).toEqual( "/about/bob");

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
世界只因有你

Routing url configuration problem

If you write like this, the first option will be there

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template