components

@font-face not working in polymer/web-components

假装没事ソ 提交于 2020-04-16 07:47:34
问题 I'm trying to get a web font into my polymer component, however the font is failing to render. Could someone shed some light on this? Google hasn't been giving me much love on this issue. If you need any more info then just let me know. Thanks! @font-face { font-family: 'open_sansextrabold'; src: url('fonts/OpenSans-ExtraBold-webfont.eot'); src: url('fonts/OpenSans-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/OpenSans-ExtraBold-webfont.woff') format('woff'), url(

@font-face not working in polymer/web-components

爷,独闯天下 提交于 2020-04-16 07:45:52
问题 I'm trying to get a web font into my polymer component, however the font is failing to render. Could someone shed some light on this? Google hasn't been giving me much love on this issue. If you need any more info then just let me know. Thanks! @font-face { font-family: 'open_sansextrabold'; src: url('fonts/OpenSans-ExtraBold-webfont.eot'); src: url('fonts/OpenSans-ExtraBold-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/OpenSans-ExtraBold-webfont.woff') format('woff'), url(

How to pass props from one class to another in React.js

試著忘記壹切 提交于 2020-04-07 18:55:11
问题 I'm very new to React. I'm practicing by creating a very simple nine grid box, where a user can select what color they want to use at the moment by using a dropdown menu. The only thing is, I can't quite figure out how to pass the variable from the class that contains it (ColorPicker) to the the class that contains the grids (Box). Can anyone give me some pointers on how to do this? I'm still getting used to passing props to other classes. Here's a link to the CodePen: http://codepen.io

How to fetching data from react.js before render compontents and Cannot read property 'includes' of undefined?

烂漫一生 提交于 2020-03-25 18:14:49
问题 I have got two components, child components and parent components. Here is data format is coming from database : {permissible_objects :["group", "topGroup"],all_permissions: ["can_view","can_create"]} I am going to pass data from parent component to child components . when I pass data parent to child compontent I got an error that is TypeError: Cannot read property 'includes' of undefined However, I saw data in the console.log(). Where is the problem of typeError can not undefined ? If I

Get instance of component on active route in Angular2's router?

◇◆丶佛笑我妖孽 提交于 2020-02-20 08:48:29
问题 I know that ActivatedRouteSnapshot.component in Angular2 contains the reference/class to the activated route if I call Router.routerState.snapshot but how to get for the component class the current (or minimal: one created) instance for it? Injector.get(..) does not return instances of components and creating a new instance of a component does also not help (me). 回答1: You can use <router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet> where $event

Get instance of component on active route in Angular2's router?

浪尽此生 提交于 2020-02-20 08:48:09
问题 I know that ActivatedRouteSnapshot.component in Angular2 contains the reference/class to the activated route if I call Router.routerState.snapshot but how to get for the component class the current (or minimal: one created) instance for it? Injector.get(..) does not return instances of components and creating a new instance of a component does also not help (me). 回答1: You can use <router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet> where $event

React component not rendering inside .map with if statement

≡放荡痞女 提交于 2020-02-05 14:54:10
问题 Please help. I have a component that I am trying to load if list.display = true. I am able to do a console log confirming when the list should be displayed and it works properly. However, the component does not load. If I take the component out of the .map loop it works perfectly. Thank you return ( <div className="container"> <h1>To Do App</h1> <p>Create a list:</p> <form> <label htmlFor="list"> <input type="text" name="list" id="list" onChange={e => setInputListName(e.target.value)}/>

Angular2 unsafe resource URL in iFrame with DomSanitationService

≡放荡痞女 提交于 2020-02-02 03:10:25
问题 Background: I'm working on a proof of concept for a transition strategy we're investigating that will pull in the "old" webapp into an iFrame while we work on converting existing functionality to Angular. Issue: The issue I'm having is trying to set the src tag on an iFrame. I'm attempting to use the DomSanitationService component, but I continue to get the "unsafe URL" error message even with this enabled. Code: Here is what I currently have; I have attempted to scrub the URL in the

Are there any “mind mapping” components for Delphi? (native VCL preferably) [closed]

允我心安 提交于 2020-01-31 18:03:25
问题 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 . I'm looking for a pre-written component (w/source) for a Delphi project that I'm working on, to generate mind-maps / concept-maps similar to these: http://en.wikipedia.org/wiki/Image:MindMeister_screenshot_OS_X.jpg http://en.wikipedia.org/wiki/Image:XMIND_2008_in_Windows_Vista.png Any ideas? 回答1: As a former

how to use parent module component in child module component in angular2

和自甴很熟 提交于 2020-01-31 06:47:47
问题 I have header that should be used in both child and parent module.that was imported and used in parent module but when try to import and using in child component it showing error.I mean how to use common header for both parent and child module Uncaught (in promise): Error: Type HeaderComponent is part of the declarations of 2 modules: AppModule and ProviderModule! Please consider moving HeaderComponent to a higher module that imports AppModule and ProviderModule. You can also create a new