JavaScript ng-class button stops working after using its activator with a link

I have this

  body
    div(ng-class="toggle ? 'nav-open' : 'nav'")
      .container
        .logo
          img(src='images/logo.png')
          span Motto
        ul(ng-class="toggle ? 'menu-open' : 'menu'")
          li
            a(target='_blank' href="#!/", ng-click='toggle = !toggle') Home
          li
            a(target='_blank' href="#!/products", ng-click='toggle = !toggle') Products

activated first by this

  button.upon(type="button", ng-click='toggle = !toggle') Menu

and you see it closes clickin on a link. The problem is that when I close it by a click it doesnt' work anymore, must refresh the page in order to do it, and using this while on mobile it just closes without changing the page. What am I doing wrong and/or is there any better way to achieve what I'm doin?

Answer:1

I am still somewhat new to JavaScript, Node, etc. and come from a Groovy background (which has extremely similar syntax to JavaScript). In Groovy, I can easily do something like this: def myMap1 = {}...

I am still somewhat new to JavaScript, Node, etc. and come from a Groovy background (which has extremely similar syntax to JavaScript). In Groovy, I can easily do something like this: def myMap1 = {}...

  1. overwrite javascript object
  2. javascript overwrite object properties
  3. javascript overwrite object in array
  4. javascript overwrite object with another
  5. javascript overwrite object function
  6. javascript overwrite object value
  7. javascript overwrite object method
  8. javascript overwrite object property value
  9. js overwrite object properties
  10. js overwrite object
  11. js overwrite object function
  12. js overwrite object in array
  13. js overwrite object value
  14. overwrite window object javascript
  15. javascript overwrite json object
  16. javascript object overwrite key

I am trying to create customized, togglable tabs in wordpress, but I am stuck. I would like to change the title part of the tabs to images. Something like that, but in wordpress: http://jsfiddle.net/...

I am trying to create customized, togglable tabs in wordpress, but I am stuck. I would like to change the title part of the tabs to images. Something like that, but in wordpress: http://jsfiddle.net/...

  1. wordpress customize tabs

I'm trying to add a class name to a child component, preserving the original classes that may be set to the component. Here is the code: import React, { Component } from "react"; import PropTypes ...

I'm trying to add a class name to a child component, preserving the original classes that may be set to the component. Here is the code: import React, { Component } from "react"; import PropTypes ...

I am using twitter bootstrap for a site and basically I have a order list within a div element. When the screen get resized to 768px, I want parent's div width, equally distributed among all child ...

I am using twitter bootstrap for a site and basically I have a order list within a div element. When the screen get resized to 768px, I want parent's div width, equally distributed among all child ...