angularjs-q

I can't create filter to extract all elements that i need

喜欢而已 提交于 2020-01-15 14:22:27
问题 I get prices, even that I don't need, how can I filter them? <div class="ssl-price-box"> <price value="377" units="/yr" class="lg-price ng-isolate-scope"><span class="price"><span class="currency-icon">$</span><span class="integer ng-binding">3.</span><span class="cent ng-binding">77</span><span class="units">/yr</span></span></price> <!-- ngIf: product.prices.max.certIsPromo --> </div> <price value="13888" units="/yr" class="lg-price ng-isolate-scope"> <span class="price"> <span class=

AngularJs Jasmine Unit test fails with Unexpected Request

假如想象 提交于 2019-12-12 04:16:46
问题 Following is my myService.spec.js : 'use strict'; describe('myService', function () { var dependentService,dependentService1,rootScope,$q; beforeEach(module('myModule.myConfig')); beforeEach(module('myModule')); beforeEach(inject(function (_myService_, _$rootScope_, _$q_,_dependentService1_,_dependentService_) { myService= _myService_; rootScope = _$rootScope_.$new(); $q = _$q_; dependentService1= _dependentService1_; dependentService= _dependentService_; spyOn(dependentService1,'setPath');