• Actually there is another (maybe better solution) where you can use the angular’s native ‘filter’ filter and still pass arguments to your custom filter.
  • Consider the following code:

    To make this work you just define your filter as the following:

    As you can see here, weDontLike actually returns another function which has your parameter in its scope as well as the original item coming from the filter.

  • It took me 2 days to realise you can do this, haven’t seen this solution anywhere yet.
  • Checkout Reverse polarity of an angular.js filter to see how you can use this for other useful operations with filter.

Actually there is another (maybe better solution) where you can use the angular’s native ‘filter’ filter and still pass arguments to your custom filter.
Continue reading “javascript”

Flask by Example

  • Grab the id and navigate to this url:

    You should see a similar JSON response in your browser:

    Now we’re ready to add in Angular.

  • Be sure to add the requirement to the index.html file:

    Here, when the form is submitted, is called, which simply logs the text “test” to the JavaScript console in the browser.

  • Instead, we’ll use the Angular service to handle this request asynchronously:

    Also, update the element in index.html:

    We injected the service, grabbed the URL from the input box (via ), and then issued a POST request to the back-end.

  • Refactor out the Redis job creation from the index view function, and then add it to a new view function called :

    Make sure to add the following import at the top as well:

    These changes should be straightforward.

  • Update main.js by adding the following code to the controller:

    Then update the success handler in the POST request:

    Make sure to inject the service into the controller as well.

This tutorial details how to utilize to create a polling service with Angular.
Continue reading “Flask by Example”


  • $broadcast will channel down to all the children dom elements and $emit will channel the opposite direction to all the ancestor dom elements.
  • The best way to avoid deciding between $emit or $broadcast is to channel from the $rootScope and use $broadcast to all its children.
  • Note we added $rootScope and now we’re using $broadcast(broadcastName, arguments).
  • In our second controller, we need to set up code to listen to our broadcast

    It’s really that simple.

  • Lastly, keep in mind a really useful broadcast to listen to is ‘$destroy’ again you can see the $ means it’s a method or object created by the vendor codes.

One thing you should know is $ prefix refers to an Angular Method, $$ prefixes refers to angular methods that you should avoid using.
Continue reading “javascript”

EasyFb : AngularJS Facebook JavaScript SDKAngularJS

EasyFb : #AngularJS Facebook JavaScript SDK 

  • EasyFb : AngularJS Facebook JavaScript SDKSuper easy AngularJS + Facebook JavaScript SDK.
  • Features:Full Facebook JavaScript SDK supportSeamless FB SDK initialization (asynchronously load script and FB.init)All SDK API callbacks are automatically applied with AngularJS contextSupport both callback and $q promiseProvide built-in directive support for Facebook XFBML plugins

Continue reading “EasyFb : AngularJS Facebook JavaScript SDKAngularJS”


  • The service provides has one method to change the locale.
  • The service is a of all the loaded locales, where the key is the locale id and the value is the locale object.
  • This module expects for the angular locales to be present at .
  • It is possible to specify a storage location for the locale using , the name of the storage must follow the same signature as .
  • Add the js file to your html:

    Add the module to your dependencies:

    Inject to your controller and set the desired locale:

    Also, here’s an example of how you may optionally override the default path ( ) to the stored Angular i18n locale files in your project:

    Lastly, if you need to set a default locale, you can do it like this:

    to run the test once

angular-dynamic-locale – Module to be able to change the locale at an angularjs application
Continue reading “GitHub”

A different point of Vue – Rodrigo Juliani – Medium

A different point of Vue  #vuejs #react #angularjs #javascript #vuejs

  • When I started looking about Vue, I felt empowered by how friendly it was to a newcomer like me (mostly thanks to the awesome Guide they provide), how simple it was to define components and whole pages, or integrate them with other frameworks.I’ve been using it for a year already, Vue2 was born during that time only to make things better, and little by little a “Personal project” became my most trusted resource when developing front-end.
  • So free that you can also use any CSS pre-processor you want, although you can directly put SASS code in your components.What about support?Big ones also fall harderYeah, yeah… Angular is backed by Google, React by Facebook… Who backs Vue?
  • A similar situation happens with Vue, since it’s Evan You’s creation, I’m pretty sure he will do amazing things now that he has the support of a team fully committed to Vue.Also… have you realized Vue is Twice as popular as Angular?
  • At the moment of this writing, Angular has 20782 stars in github, Vue has 43557 and React 59955.
  • Every day many sub-frameworks arise (such as the awesome vue-material) and small components to make your life easier, the ecosystem relying on Vue grows as much as products using it.I, for one, will continue mixing it in everything I do while I can, because I consider it the most honest effort to make developers life easier.

Some days ago, at the office, we were discussing which technology/framework should we use in a new project so we could build a really cool front-end. Several ideas were tossed on the table, Angular…
Continue reading “A different point of Vue – Rodrigo Juliani – Medium”