Wednesday, February 24, 2016

ANGULARJS - how dynamically set templateUrl to derective

emanuel.directive('hymn', function() {
   return {
       restrict: 'E',
       link: function(scope, element, attrs) {
           // some ode
       },
       templateUrl: function(elem,attrs) {
           return attrs.templateUrl || 'some/path/default.html'
       }
   }
});
 <hymn template-url="contentUrl"><hymn>
http://stackoverflow.com/questions/21835471/angular-js-directive-dynamic-templateurl

JAVASCRIPT - Introduction to JavaScript by Yakov Fain (video)

Friday, February 19, 2016

Defining JAVA_HOME in Mac OSX

1. set it directly in ~/.profile
2. check it by running /usr/libexec/java_home (read this article)

GRADLE - bind Gradle with Bower and Grunt

http://gruntjs.com/
http://bower.io/

https://github.com/srs/gradle-grunt-plugin/issues/16
http://blog.crisp.se/2013/04/30/yassalsundman/test-driving-javascript-grunt-with-gradle
http://blog.crisp.se/2013/03/31/danielsundman/test-driving-javascript-its-never-been-easier

AngularJS - REST and custom services

https://docs.angularjs.org/tutorial/step_11