This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fileModel = angular.module('directives.fileModel', []); | |
| fileModel.directive('fileModel', ['$parse', function ($parse) { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| var model = $parse(attrs.fileModel); | |
| var modelSetter = model.assign; | |
| element.bind('change', function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var classRoute = angular.module('directives.classRoute',[]); | |
| classRoute.directive('classRoute', function($rootScope, $route) { | |
| return function(scope, elem, attr) { | |
| var previous = ''; | |
| $rootScope.$on('$routeChangeSuccess', function(event, currentRoute) { | |
| var route = currentRoute.$$route; | |
| if(route) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function (grunt) { | |
| // Load grunt tasks automatically | |
| require('load-grunt-tasks')(grunt); | |
| // Time how long tasks take. Can help when optimizing build times | |
| require('time-grunt')(grunt); | |
| grunt.initConfig({ |
NewerOlder