So my HTML is:
<div class="checkbox" ng-repeat="test in tests">
<a ui-sref="test{{id: test._id}}"><pre>{{test._id}}</pre></a>
</div>
My router config in app.js
myApp.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("");
$stateProvider
.state('main', {
url: ""
})
.state('new', {
url: "/new",
templateUrl: "templates/new.html"
})
.state('test', {
url: "/tests/:id",
templateUrl: "templates/test.html"
})
});
I have an error which console throw
Error: Syntax Error: Token ':' is an unexpected token at column 3 of the expression [id: test._id] starting at [: test._id]. at Error (native) What the problem?