filmov
tv
AngularJS Quiz App Tutorial (6/24) - Ng-click and ng-show directives

Показать описание
The writeup for this video:
Part 1 of this series:
The Git Repo for this project:
To move away from the list view and into the quiz view we need a button that can be clicked to trigger that transition. That is the first thing we need to do in this video. The button is created with some basic bootstrap markup and then a new angular directive will be used to trigger the functionality on the clicks.
The new directive in question is called ng-click and as an argument it accepts a function or statement that will be triggered every time the html element is clicked on.
With that button created we will need to figure out how to hide the list view and show the quiz view. The first part of tackling that will be to introduce some new angular directives called ng-show and ng-hide respectively.
ng-hide and ng-show take a conditional as an expression as an argument and will then either hide or show the html element depending on what the expression evaluates to (true or false).
Support Me On Patreon
One Off Donations:
Bitcoin: 39iDX27ZSkYtRhUrH5r5YN128wEjwDmSYp
Ethereum: 0x38b3cBF8Ee3EeeeA33D1925bA0ce0e90c8EcFD46
Horizen (ZEN): znanBCHpWJecBwZZmft9r5QzbzRX4nQn6Dz
Check Out The Site!
SUBSCRIBE!
Join the Community!
Part 1 of this series:
The Git Repo for this project:
To move away from the list view and into the quiz view we need a button that can be clicked to trigger that transition. That is the first thing we need to do in this video. The button is created with some basic bootstrap markup and then a new angular directive will be used to trigger the functionality on the clicks.
The new directive in question is called ng-click and as an argument it accepts a function or statement that will be triggered every time the html element is clicked on.
With that button created we will need to figure out how to hide the list view and show the quiz view. The first part of tackling that will be to introduce some new angular directives called ng-show and ng-hide respectively.
ng-hide and ng-show take a conditional as an expression as an argument and will then either hide or show the html element depending on what the expression evaluates to (true or false).
Support Me On Patreon
One Off Donations:
Bitcoin: 39iDX27ZSkYtRhUrH5r5YN128wEjwDmSYp
Ethereum: 0x38b3cBF8Ee3EeeeA33D1925bA0ce0e90c8EcFD46
Horizen (ZEN): znanBCHpWJecBwZZmft9r5QzbzRX4nQn6Dz
Check Out The Site!
SUBSCRIBE!
Join the Community!
Комментарии