I asked this already but have not achieved the following. I'm am trying to get Angular to talk across Controllers in MVC to control a paragraph being visible/ hidden. I am using Typescript, not Javascript.
I have two controllers and two views, view1.cshtml/view1.ts and view2.cshmtl/view2.ts.
In view1.cshtml I have a button:
<a class="Button" id="button1" data-ng-click="minorTask(); toggle()">Click</a>
I have added in toggle() as the function I want to use to show the paragraph in view2.cshmtl.
The div in view2.cshtml:
<div id="toggleThis">
<p>Some text<p>
<div>
I want the button in view1 to be tied to the toggleThis visibility from view2. When button1 is clicked it should set the text in view2 to be visible, while it carries out the other function as normal.
Q1: How do I set it up so that when button1 is clicked it sets toggleThis from hidden to visible?
Q2: How do I set toggleThis to be initially hidden?
Q3: In which Typescript file should I put the function(s)?