How can I automate both E2E and unit tests with Yeoman & AngularJS?

As I mentioned in a comment to your question – PhantomJS saves a lot of hassle. That aside, I believe you can handle everything from within your Gruntfile and just continue to run grunt test to start the whole thing. grunt-karma allows full customization of your karma options with some handy add-ons. From the docs: … Read more

Pass inputs to nested component in Angular 2

I’m not sure if I got it right but here is my implementation ( PLUNKER ) const FIRST_PARTY_OWN_INPUTS = [‘not’, ‘passthrough’]; const FIRST_PARTY_PASSTHROUGH_INPUTS = [‘all’, ‘attrs’, ‘are’, ‘passed’]; const generateAttributes(arr) { return arr.map(att => ‘[‘ + att + ‘] = “‘ + att + ‘”‘).join(‘ ‘); } //——————————————————-////////////////// import {Component} from ‘@angular/core’ @Component({ selector: ‘third-party’, … Read more

Is binding objects to angular’s $rootScope in a service bad?

Although from a high level, I agree with the answer by bmleite ($rootScope exists to be used, and using $watch appears to work for your use case), I want to propose an alternative approach. Use $rootScope.$broadcast to push changes to a $rootScope.$on listener, which would then recalculate your c value. This could either be done … Read more

Why is $element available/injected in controller?

Quick summary A well written directive that is extendable and/or interacts with other directives will have a controller. That controller needs to access the DOM because it is where that directive’s functionality is defined. Directives are effectively a different way to bind a controller/scope to an element on the page; the preferred way to add … Read more

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