Bogdan's blog

Code and anything else.

share variables

Angular.js share variables between controllers with service

May 10, 2017 Bogdan Leave a comment Angular, javascript

Note: This article applies to Angular 1 and the example is written in ES5. Let’s say you have a directive where you have a button and once clicked you want an event to happen in another directive. The problem is that the two directives have different scopes, so passing the change directly is not possible. […]

Continue reading


Search for:

Recent Posts

  • Vue 3 is out – what should I do next?
  • Javascript for of index
  • Vuetify upgrade to 2
  • Fetch data needed on component’s template in Vue before render
  • How to @extend sass classes or use sass global variables in Vue components

Recent Comments

  • Luke on How to watch for changes an array/object on Angular 2
  • Raphael on Grails clean global mock on integration tests to avoid polluted environment
  • Abdul Manan on How to watch for changes an array/object on Angular 2
  • Bryan Tayler on Angular how to dynamically inject a component to DOM

Archives

  • September 2020
  • June 2020
  • August 2019
  • March 2019
  • June 2018
  • January 2018
  • December 2017
  • October 2017
  • August 2017
  • June 2017
  • May 2017

Categories

  • amazon web services
  • Angular
  • Angular 2
  • Angular Material
  • cloud
  • Continuous Integration
  • css
  • grails/groovy
  • javascript
  • TypeScript
  • vuejs
  • Vuetify

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
dazzling Theme by Colorlib Powered by WordPress