Here at platanus he have a 42” tv screen with some metrics about our products, our resources and some fun and usefull info. The software we are using behind it is Dashing, a really cool sinatra based application to create dashboards with different widgets of information.

I originally wrote this as a guide to get the dashboard working with a raspberry-pi. The problem was that I wanted to run my dashboard with the chromium browser to have all the props a modern browser has. But the raspberry-pi wasn’t up the task. …


Angular nos provee una manera alternativa de definir los controladores llamada controller as, esta puede ser usada en la directiva ng-controller.

Estas practicas estan tomadas del angularjs-styleguide de John Papa.

En la vista

  • Promueve el uso de objetos con “punto” en la vista (e.g customer.name ovm.name) en vez de name, de esta manera nos ahoramos el posible problema que se rompa el binding por perdese la referencia al valor.
  • Ayuda a evitar el usar la propiedad $parent para acceder a otros controlladores.
<div ng-controller="CustomerCtrl as vm">
{{ vm.name }}
</div>

John Papa’s Styleguide: controllerAs View Syntax

En el controllador

  • Usamos el controllador como un objecto que…

One of the neat things about angularjs routes system is the ability to use the html5 pushstate apis to remove the hash (#) from the url when creating a single page sites.

For this to work you need to tell your server that every request must be rewrited to /index.html, this way angular is goint to take care of the rest.

If you are using yeoman 1.0 to scaffold your app, you should have a Gruntfile.js in the root of your project. You can add some rewrites using the connect-modrewrite module.

Juan Ignacio Donoso

Designer/Developer. I enjoy hacking with JS, HTML, CSS, Ruby. I’m a technology enthusiast and I ♥️ coffee and beer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store