plunker

Polymer 1.x: How to filter iron-data-table?

巧了我就是萌 提交于 2019-12-13 08:27:49
问题 How do I add a filter attribute to <iron-data-table ? (Please post a plunk demo.) I forked this plunk. Then I tried to add a filter by adding the following line: <iron-data-table ... filter="['item.user.name.first.length', '< 5']"> Which broke the plunk. Here is the new (now broken) plunk. The documentation here describes the filter attribute as follows: filter An array containing path/filter value pairs that are used to filter the items. But it lacks an example of how to use it. How do I add

Hash linking with routing - `$anchorScroll` troubleshooting

江枫思渺然 提交于 2019-12-13 00:13:47
问题 Note: I still haven't solved this. This post seems to describe a solution to my problem since I'm using ngRoute and am on a newer version of Angular, but I couldn't make her solution work: https://stackoverflow.com/a/35028895/6647188 On my single page app: https://kylevassella.github.io/ I'm trying to link my nav buttons to hash links on a different view. I've been using the accepted answer here for help: How to handle anchor hash linking in AngularJS But I'm having trouble implementing (

Plunker with AngularJS and Typescript possible?

我只是一个虾纸丫 提交于 2019-12-12 07:52:47
问题 I have some code I would like to ask questions about on stackoverflow. The code is written in AngularJS with Typescript, and does manipulation and watching of the $location.hash. I now have the code on github at https://github.com/svdoever/AngularJS-bookviewer. Is it possible to have this code, preferably without the compiled Typescript files, up at http://plnkr.co? I read at https://twitter.com/filearts/status/290961349092208642 that Typescript should be suported on http://plunkr.co. Edit:

How do I import Polymer elements into code playgrounds like plunker (plnkr.co), jsBin and jsFiddle?

蹲街弑〆低调 提交于 2019-12-12 07:25:07
问题 Question: In this Plunk, I want to import the Polymer 1.0 elements <paper-button> and <paper-menu> . How do I do that? In other words, what is the proper set of <script> and <link> tags and their respective src and href attributes that will allow my <paper-button> and <paper-menu> elements to properly function? Attempts: In the right margin, there is an option to search and import external libraries. I used that to search for Polymer 1.0 and I imported the following. <script data-require=

Angular 4.1.0 in Plunker: adding component returns 404 XHR Error

扶醉桌前 提交于 2019-12-11 06:13:58
问题 I'm trying to use Angular 4 with Plunker and I can't manage to add a new component. The URL is: https://plnkr.co/edit/1umcXTeug2o6eiZ89rLl?p=preview I've just created a new component - mycomponent.ts - with the minimum of declarations. Then, in app.ts , I'm adding the importing declaration: import {MyComponent} from "./mycomponent"; and add the component in the declarations array within the @NgModule decorator: declarations: [ App, MyComponent ], This last bit breaks it and returns a 404 XHR

Angular2 on JSFiddle – How to include .ts file?

佐手、 提交于 2019-12-11 06:07:44
问题 I am using jsFiddle for the first time. I do not know how to include all my files in it. Currently when running the fiddle it returns a 404. How do i link my local ts file to make it run. My fiddle is located here. Any help would be greatly appreciated. <script>document.write('<base href="' + document.location + '" />');</script> <script> System.config({ transpiler: 'typescript', typescriptOptions: { emitDecoratorMetadata: true }, packages: {'app': {defaultExtension: 'ts'}} }); System.import(

AngularJS templateUrl vs template - isolate scope

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 01:28:52
问题 I have the following directive: offerListSorters.directive('offersSorter', ['myState', '$templateCache', function (myState, $templateCache){ return { scope: {}, controller: function($scope, $element, $attrs, $transclude) { [...] }, restrict: 'E', //templateUrl: 'partials/offersSorterDirective.html', template: $templateCache.get('partials/offersSorterDirective.html'), replace: true, transclude: true }; }]); And I use Karma + Jasmine to test this code and it works. But now if I switch to the

Angular 2 RC.5 Plunker error: TypeError: core_1.NgModule is not a function

若如初见. 提交于 2019-12-10 19:17:26
问题 I upgraded my Angular 2 Plunker from RC.4 to RC.5 by doing the following: updated systemjs.config.js to match the quickstart plunker updated main.ts to match the quickstart plunker created file app/app.module.ts, and populated it with what the quickstart plunker has I don't see any other changes that are required for my simply plunker. I keep getting this error: Error: TypeError: core_1.NgModule is not a function(…) 回答1: I hit the exact same problem on my project. It worked on 1 pc, didn't

array.sort() does not work in IE 11 with compareFunction [duplicate]

怎甘沉沦 提交于 2019-12-08 15:58:16
问题 This question already has answers here : How to sort strings in JavaScript (11 answers) Sorting in JavaScript: Shouldn't returning a boolean be enough for a comparison function? (2 answers) Closed 5 years ago . I'm sorting an array following JavaScript Array sort() Method. When I use a compareFunction parameter, Internet Explorer 11 is not sorting properly. I have a team array with players. These players have names: var team = [ {name:"Waldo"}, {name:"Sarah"} ]; But I want to display them at

Can you import dependencies from your other plunks?

与世无争的帅哥 提交于 2019-12-08 06:11:20
问题 Is it possible to import my other plunker as a library in a new plunker? Say, I've built a few AngularJS directives in a plunker. Can I reuse them in my other plunkers? 回答1: You absolutely can refer from one plunk to another, but the mechanics to do so are not very well exposed. Historically, Plunker didn't expose this to users by design. In future versions, Plunks will be publishable as semver versioned packages to the package manager and this sort of thing will automatically be wired up for