Gulp AssertionError [ERR_ASSERTION]: Task function must be specified

I just run into the same problem while upgrading to gulp 4. The depending tasks have to be specified as series or in parallel, just the name is not enough anymore. Example gulp.task(‘copy’, [‘sass-min’], function() { Becomes gulp.task(‘copy’, gulp.series(‘sass-min’), function() { gulp.parallel can also be used to execute the tasks in parallel

AngularJS : minification issue in directive

You need to declare a controller as follows: controller: [‘$scope’, function ($scope) { $scope.test = 3; }] Full example here: angular.module(‘person.directives’). directive(“person”, [‘$dialog’, function($dialog) { return { restrict: “E”, templateUrl: “person/views/person.html”, replace: true, scope: { myPerson: ‘=’ }, controller: [‘$scope’, function ($scope) { $scope.test = 3; }] } }]); A solution provided by @Sam would … Read more

ng-show when array length is zero

If you’re filtering in your ng-repeat, you must apply the same filter for you ng-show. If you don’t, the ng-show will always refer to the full array : <div ng-show=”!(tags| filter:nameText).length”>No Tag Found</div> Working fiddle : http://jsfiddle.net/HB7LU/3149/

accessing $scope from unit test file when using the vm “ControllerAs” syntax from AngularJS HotTowel

Ah, obvious now…I can access the vm variable through making a reference to the controller that’s created in the test: it(“should assign Dashboard as title”, function () { var vm = controller(“dashboard”, { $scope: scope }); expect(vm.title).toBe(“Dashboard”); });

AngularJS clientside routing and token authentication with webapi

Whether to use cookie authentication or (bearer) tokens still depends on the type of app you have. And as far as I know there aren’t any best practice yet. But since you are working on a SPA, and are already using a JWT library, I would favor the token based approach. Unfortunately, I cannot help … Read more

Reverse polarity of an angular.js filter

As noted by ENDOH (this SO question is technically a duplicate), you can negate a filter by prepending ‘!’ to the filter string, like this: filter:’!’+myFilter Note that the ‘!’ is quoted. The documentation is not terribly clear on this, and an example there would be helpful.

How to run grunt server in dist directory instead of app directory?

The very short answer is grunt serve:dist That works with my yeoman-generated Gruntfile.js which contains: grunt.registerTask(‘serve’, function (target) { if (target === ‘dist’) { return grunt.task.run([‘build’, ‘connect:dist:keepalive’]); } grunt.task.run([ ‘clean:server’, ‘bower-install’, ‘concurrent:server’, ‘autoprefixer’, ‘connect:livereload’, ‘watch’ ]); });

Angular ng-repeat with ng-form, accessing validation in controller

Updated 2015-01-17: As pointed out by Leblanc Meneses in the comments Angular 1.3 now supports interpolation with form, ngForm and input directives. This means that using expressions to name your elements: <div ng-form=”namesForm_{{$index}}” ng-repeat=”name in names”> <input type=”text” name=”input_{{$index}}_0″></input> <!– … –> </div> will work as expected: $scope[‘namesForm_0’] $scope.namesForm_1 // Access nested form elements: $scope.namesForm_1.input_1_0 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)