kpanyushin2017-03-05 19:09:40
kpanyushin, 2017-03-05 19:09:40

Angular ng-show how right?

Essence. There are 3 buttons, add/save/edit. How to make it so that initially it was visible only to add and edit, and by clicking on edit, instead of adding, it was visible to save? As I understand it, this is somehow done through ng-show ng-hide.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Evgeny Nikolaev, 2017-03-05

ng-show and ng-hide are so-called "functions" that work with the "display" style of the element being used. They work as follows:
Set an attribute to the element, for example, ng-show="test()".
test(); is a function that will return either true or false.
These values ​​will indicate whether the element will be displayed or not.
For example:

$scope.test = function(){
return true;

In this case, the div will be displayed, and if the test() function returns false, the display style of this block will be set to "none". and it won't show up

Garik_Shuster, 2017-11-30

Reset the router to factory settings, and reconfigure the provider.

Sergey Ryzhkin, 2017-11-29

Open IE and in its properties on the connection tab, put a radio dot on the item "Detect network settings automatically", and check.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question