javascript - ng-show not working after boolean change -
I have a ng-click in my navbar to change a boolean and show my div When I click it, the boolean changes, but ng-show does not answer
This HTML is in my layout file, while I'm working with the controller I am in my body html file. When I have put the HTML in my body, the html file works fine? What could be going on? I could not find any errors from angular or elsewhere. All my scripts include my layout file as well as my angular app definitions.
In the HTML layout file:
& lt; Div class = "navbar-collapse collapse" ng-controller = "movies ctrl" & gt; & Lt; Ul class = "nav navbar-nav" & gt; & Lt; Li class = "active" & gt; & Lt; A href = "index.html" & gt; & Lt; I class = "icon-house icon-white" & gt; & Lt; / I & gt; Today & lt; / A & gt; & Lt; / Li & gt; & Lt; Li ng-click = "flip two days ()" & gt; & Lt; A & gt; & Lt; I class = "icon-folder-open icon-white" & gt; & Lt; / I & gt; Two days & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "manager.html" & gt; & Lt; I class = "icon-folder-open icon-white" & gt; & Lt; / I & gt; All & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; HTML in the body file:
& lt; Div ng-show = "twoday.show" & gt; & Lt; H1 & gt; {{Tomorrow}} & lt; / H1> & Lt; Div ng-repeat = "places in theat data." & Gt; & Lt; Div class = "col-sm-6 col-lg-6" & gt; & Lt; Div class = "dash-unit" & gt; & Lt; Dtitle & gt; {{Theat.Name}} & lt; / Dtitle & gt; & Lt; Hour & gt; & Lt; Div ng-repeat = "Theat.Dates in movie [Yesterday]" & gt; {{Film.title}} {{film.times}} & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Javascript which resides in the lower part of the body cshtml file.
mabuse.page.moviesCtrl = function ($ scope, $ firebase) {var ref = new firefighter ("https://mabuse.firebaseio.com/"); // data sync = create an angular reference for $ firebase (referee); $ Scope.data = sync $ AsObject (); Var currentDate = new date () var day = currentDate.getDate () var month = currentDate.getMonth () + 1 var year = currentDate.getFullYear () if (day & lt; 10) {dat = '0' + day} If (month and lieutenant; 10) {month = '0' + month} $ scope.today = day + "" + month + "" + year; Day + = 1; $ Scope.tomorrow = day + "" + month + "" + year; $ Scope.twoDay = {Show: False}; $ Scope.flipTwoDay = function () {$ scope.twoDay.show = true; // $ radius $ Digest (); Console.log ($ scope.twoDay.show); }; Console.log ($ scope.tomorrow); };
Comments
Post a Comment