components

angular2 test, how do I mock sub component

孤街醉人 提交于 2019-12-18 10:02:32
问题 How do I mock sub component in jasmine tests? I have MyComponent , which uses MyNavbarComponent and MyToolbarComponent import {Component} from 'angular2/core'; import {MyNavbarComponent} from './my-navbar.component'; import {MyToolbarComponent} from './my-toolbar.component'; @Component({ selector: 'my-app', template: ` <my-toolbar></my-toolbar> {{foo}} <my-navbar></my-navbar> `, directives: [MyNavbarComponent, MyToolbarComponent] }) export class MyComponent {} When I test this component, I do

Cannot Change Component Property Values

三世轮回 提交于 2019-12-18 09:33:40
问题 I have the latest version of Redhawk and CentOS, and I have run into a few problems right off the bat. Initially I couldn't see the Chalkboard and Sandbox, but that issue was resolved by commenting out (#) one of two lines in the eclipse.ini file: -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton I found this fix from here. It was noted that while there were no obvious errors that arose, there may be some unforeseen problems. The issue I

How to access App.vue from another component?

两盒软妹~` 提交于 2019-12-18 09:15:10
问题 in my app written with VueJs 2, I have into the Vue.app this code: export default { name: 'app', data () { return { title: 'Gestione fornitori', idfornitore: '' } }, methods: { loadFunction (route) { this.$router.push(route) } } } </script> I wish to access the property idfornitore from another component, I've used: mounted () { this.$parent.idfornitore = '' }, or also: mounted () { var Vue = require('vue') Vue.app.idfornitore = '' }, But it didn't worked. Which is the correct way to access

Register component based on parameter name on requestor in windsor

半世苍凉 提交于 2019-12-18 08:39:28
问题 I have this interface for using AutoMapper: public interface IMapper { object Map(object source, Type sourceType, Type destinationType); } Then for each type of data, I have a different mapper class , for example: public class UserMapper : IMapper { static UserMapper() { Mapper.CreateMap<User, UserViewModel>(); Mapper.CreateMap<UserViewModel, User>(); } public object Map(object source, Type sourceType, Type destinationType) { return Mapper.Map(source, sourceType, destinationType); } } Then I

Angular 2 - send textarea value to a shared component

落花浮王杯 提交于 2019-12-18 07:15:16
问题 I have a textarea in the first page and when i go to next page i need this value to show in a notepad component that is shared in the next pages but at the same time i need that when i write new info in the shared component first and new information can be saved and displayed. i need to use angular2 and i cant use any stuff from github.enter image description here 回答1: Since its not a parent-child relation, you can use shared service and pass the textarea value using setter and getter .

How do I add support for actions in my component

谁说我不能喝 提交于 2019-12-18 05:59:10
问题 What do I need to do for adding actions support to my component. It is a button component but I guess it is the same for whatever component type it is. Any information or how to will help. 回答1: That depends on how you define action support . There is two kinds: A possibly customized Action property of your component, which is assignable by an Action component The Action component itself. An action property Every TControl descendant has an Action property which execution is by default linked

Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

大城市里の小女人 提交于 2019-12-18 05:43:17
问题 As stated in the title, I copied my DLL in Visual Studio project, set it to "content" and "copy always". Added a reference to this DLL and set it to "copy locally". I successfully managed to instance my component to a form through code but it doesn't appear in the toolbox, really boring. How can I solve this issue? If I link directly the DLL project to this project it works, but now I'm treating the DLL as "external" so it's not part of the same solution of the DLL project. 回答1: I had this

Barcode generation libraries for Delphi [closed]

时光毁灭记忆、已成空白 提交于 2019-12-18 05:18:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . is there any barcode generation libraries for Delphi (prefered freeware of course), which generate most known barcode types (Code 39, Code 93, EAN, UPC)? 回答1: The old TurboPower SysTools (available from SourceForge) does POSTNET, UPC A, UPC E, EAN 13, EAN 8, Interleaved 2 of 5, Codabar, Code 11, Code 39, Code 93

Spark lifecycle changes between Flex 4.5 and 4.6

久未见 提交于 2019-12-18 04:08:49
问题 I have recently migrated some of my projects to the shiny new Flex 4.6 SDK. I wasn't expecting much trouble since it was only a minor release. But as a matter of fact I got hundreds of errors all over the place. These errors would mostly come from Spark SkinnableComponent s; for example: override protected function getCurrentSkinState():String { return mySkinPart.someProperty ? "normal" : "someOtherState"; } would work just fine under 4.5, but would throw me a nullpointer error in 4.6. The

call a function in a component from another component

℡╲_俬逩灬. 提交于 2019-12-17 20:54:30
问题 In Angular2 , assume I have component1(use it as left panel navigator) and component2 .these two components are not related to each other (sibling, parent and child, ...). how can I call a function in component1 from component2? I cant use event binding here. 回答1: Shared service is a common way of communication between non-related components. Your components need to use a single instance of the service, so make sure it's provided at the root level. Shared service: @Injectable() export class