Some will have to be in the JS, but that isn't really any different from non-SPA web apps. They still serve up JS files that have business logic. JS and business logic are, to some degree, inseparable.
If you're giving trust to a user to query the API, they could also maliciously leak data or execute queries inside a normal web app just as easily if you build something appropriately secure.