Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • the model value is being watched, set user.siteId = 2 instead Commented Apr 17, 2019 at 7:56
  • @svarog how do I set a model value from JS? user.siteID = 2; does not work because user is not defined. Commented Apr 17, 2019 at 8:01
  • you do it in the controller, you define and object user and add a property siteId with the value 2, e.g. $scope.user = {}; $scope.user.siteID = 2; Commented Apr 17, 2019 at 8:13