Update docs/en/beamng/dev/modding/ui-apps.md

Co-authored-by: O1LER <44237025+O1LER@users.noreply.github.com>
This commit is contained in:
BoubouleTheCutestHamster 2025-01-15 14:55:13 +01:00 committed by O1LER
parent 0385a8307b
commit 726900db47

View File

@ -118,7 +118,7 @@ angular.module('beamng.apps')
Note the usage of <b>$scope</b>. This is very important because you will need to define your variables and functions within <b>$scope</b> to be able to access it from the <b>Html</b> inside any <b>ng-*</b> tag. Note the usage of <b>$scope</b>. This is very important because you will need to define your variables and functions within <b>$scope</b> to be able to access it from the <b>Html</b> inside any <b>ng-*</b> tag.
So in this example, after the ``sendMessage()`` function being executed from the <b>Html</b> it will send it to a lua file located in the extensions directory of the mod and execute the ``modifyMessage()`` function inside this lua file. So in this example, after the ``sendMessage()`` function being executed from the <b>Html</b> it will send it to a lua file located in the extensions directory of the mod and execute the ``modifyMessage()`` function inside this lua file.
This lua function look like this : An example of how the lua side could look like:
```lua ```lua
local function modifyMessage(message) local function modifyMessage(message)
message = message .. " [Modified!]" message = message .. " [Modified!]"