I get an error in my developer console as such:
Error: [$parse:syntax] http://errors.angularjs.org/1.6.5/$parse/syntax?p0=%7B&p1=invalid%20key&p2=43&p3=GetTimelineByUserIdAndProjectId(u.UserId%2C%7B%7BselectedProject.Id%7D%7D)&p4=%7BselectedProject.Id%7D%7D)
angular
$scope.GetTimelineByUserIdAndProjectId = function (userId, projectId) {
alert(userId +"-"+projectId);
}
HTML
<div class="active tab-pane" id="view_projects">
<div>
<form class="form-inline">
<select ng-model="selectedProject" class="selectpicker" data-live-search="true"
ng-options="s.Description for s in allProjects track by s.Id"
ng-change="getProjectsByUserId(selectedProject.Id)"
select-picker></select>
<select ng-model="selectedDeveloper" class="selectpicker" data-live-search="true" ng-options="u.ID as u.FullName for u in allUsers" select-picker></select>
</form>
</div>
<br/>
<div >
<div class="panel panel-default" style="width:25%" ng-show="showUserTable">
<div class="panel-body">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Developers for {{selectedProject.Description}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="u in usersByProjectId">
<td ng-click="GetTimelineByUserIdAndProjectId(u.UserId,{{selectedProject.Id}})"><a href="javascript:void(0);"> {{u.Developer}}</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
I should be able to get the "alert" when I click on the list. If I just get the u.userId I am actually able to get the alert with the value but when I add the {{selectedProject.Id}} that's when I get the error.
{{ }}) aroundselectedProject.Idbut notu.UserId? Expressions aren't valid as function parameters, remove the brackets and it should work. The fact thatu.UserIdworked without them should be a strong clue that they aren't needed / won't work.