mirror of
https://github.com/BeamMP/Docs.git
synced 2025-07-01 23:45:46 +00:00
Update docs/en/beamng/dev/modding/ui-apps.md
Co-authored-by: O1LER <44237025+O1LER@users.noreply.github.com>
This commit is contained in:
parent
726900db47
commit
c917972a67
@ -127,7 +127,7 @@ end
|
||||
```
|
||||
^ This is a simplified version of the lua to just show the function
|
||||
|
||||
The main things here is the usage of <b>guihooks.trigger</b> which triggers an AngularJS event defined with ``$scope.$on()``. As you can see at the very bottom of the Javascript file the event is named MessageReady and will be executed by the <b>guihooks.trigger</b> function with the message payload and then will be pushed inside the ``$scope.messages`` variable to be displayed by the li tag using <b>ng-repeat</b> in the <b>Html</b> file
|
||||
The main focus here is the usage of <b>guihooks.trigger</b> which triggers an AngularJS event defined with ``$scope.$on()``. As you can see at the very bottom of the Javascript file the event is named MessageReady and will be executed by the <b>guihooks.trigger</b> function with the message payload and then will be pushed inside the ``$scope.messages`` variable to be displayed by the li tag using <b>ng-repeat</b> in the <b>Html</b> file
|
||||
|
||||
The full lua file is just below
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user