components

how to access properties passed to Ember Component inside a component-class?

孤街浪徒 提交于 2019-12-06 05:24:56
问题 I have DECLARED an emberjs component in template as: <script type="text/x-handlebars" id="components/custom-component"> <h4>The name of the object passed is : {{object.name}}</h4> {{#if show_details}} <p>The details of the object passed are : {{object.details}}</p> {{/if}} </script> Now I am USING this component in my html template as : <script type="text/x-handlebars" data-template-name="index"> <ul> {{#each object in model}} <li>{{custom-component object=object}}</li> {{/each}} </ul> <

Need a ComboBox with filtering

情到浓时终转凉″ 提交于 2019-12-06 04:43:33
问题 I need some type of ComboBox which can load it's items from DB. While I type some text in to it, it should filter it's list, leaving only those items, that have my text somewhere (at the beginning, middle...). Not all my DataSet's have filtering capabilities, so it is not possible to use them. Is there any ready to use components with such abilities? I have tried to search in JVCL, but without luck. 回答1: You could try customizing the autocomplete functionality of a regular ComboBox. Loading

What is the recommended way of adding components downloaded from nuget to toolbox?

一笑奈何 提交于 2019-12-06 03:33:05
I have a C# Windows Forms project in which I use a component that I obtained through nuget. Now I was wondering what is the correct way of adding this component to the toolbox in the designer. Should I make a separate copy of the component on my hdd and add it from there or should I just add it from the project's packages folder or maybe do something different entirely? I was wondering if: having a separate copy of the component won't cause problems if I use a newer version of the component in another project? using the copy from packages folder and then deleting, moving the project, won't

Angular 2 - Styling Component's selector border css property

霸气de小男生 提交于 2019-12-06 02:49:21
问题 Update: In my comment bellow you can find a zipped project on Google drive. Can anyone make a Plunker (I have never done it - what needs to be changed, any article/blog explaining this change). I have a SearchComponent which extends BaseComponent and I am passing ElementRef down to BaseComponent so that BaseComponent can add a border style to SearchComponent 's selector tag: auction-search . Basically I want to draw a border for all components (that extend BaseComponent ) on a page, so I can

Angular 2 share websocket service across components

旧街凉风 提交于 2019-12-06 02:33:56
问题 I am building a web application using angular 2 in which I want to have multiple components listening to the same service. This service returns an observable that returns incoming data from a websocket. I wrote the code based on this example. The current problem is: The data is send from the home component through the service to the server (using websockets) and data is returned. However, only the observer in the home.component is getting called (with id: room.created and data), not the one

Use classes from another MEF assembly without referencing to it

╄→尐↘猪︶ㄣ 提交于 2019-12-06 02:03:05
I have 2 MEF components. Let it be component A and component B. What I need is to be able to access a class from component B in component A without referencing to it. Then I would like to instantiate object of the class manually. Currently I see MEF allows instantiating an object automatically using [Import]. It uses interface which requires to be referenced to. Can I use data types from another assemblies without referencing to it? Is there such mechanism supported by MEF? There are a couple of ways to do this. First, you need to define a common interface that both assemblies understand. This

Angular 2 unit testing data passed from parent component to child component

故事扮演 提交于 2019-12-06 01:39:02
问题 I have a question about the way I've seen (the very few) examples of testing of data passed down from a parent component into a child component. Currently, in the Angular2 docs, they're testing to see if data has been passed down from a parent component to a child by inspecting the dom values of the child component . The issue that I have with this approach is that it forces the parent's spec to know the html structure of the child component. The parent component's job is just to pass data

Driving DTR with System.IO.Ports.SerialPort in .NET

南笙酒味 提交于 2019-12-06 01:31:21
I have a sensor that uses RS232 over USB to receive commands from a PC and send data to the PC. The sensor needs to be reset (using the DTR line) before a command can be sent to it. I tried to use the built-in .net serial port, but it does not seem to drive the DTR line as expected. I am beginning to wonder if the DTREnable property actually drives the DTR pin, or if it only enables it during handshaking. Other SerialPort implementations that I could find on the web also uses the Win32 API, but I find it very difficult to close the port with these implementations. If I step through code I can

.NET Query Builder component

浪尽此生 提交于 2019-12-06 01:26:53
问题 Can anyone reccomend a free .NET libary which allows you to expose a SQL Query builder to your users in a windows form app? I'd like my users to be able to run relatively straight forward SELECT statements, including some JOINS and other multi-table operations without getting into the real nitty-gritty of SQL. Thanks, sweeney 回答1: Report Builder is part of SQL Server Reporting Services, and it lets you do all of that and more. You can setup non-MSSQL data sources as well. We have non

How do I overwrite an existing component in angular?

北城以北 提交于 2019-12-06 01:19:04
I am trying to overwrite an existing component in angular. My original component is: @Component({ selector: 'app-orginal', templateUrl: './orginal.component.html', styleUrls: ['./orginal.component.css'] }) export class OrginalComponent implements OnInit { } in the app.component.html I use the original component like that: <app-orginal></app-orginal> What you would like to do is overwrite the original component with the mock component. This is my mock component: @Component({ selector: 'app-mock-of-orginal', templateUrl: './mock-of-orginal.component.html', styleUrls: ['./mock-of-orginal