Skip to content

Instantly share code, notes, and snippets.

View pkozlowski-opensource's full-sized avatar

Pawel Kozlowski pkozlowski-opensource

View GitHub Profile
==================================================
WATCH TRIGGERED BY FILE CHANGE #2
On: 6/9/2015 at 6:48:41 PM
==================================================
[18:48:41] Starting '!build/tree.dart'...
Slowest Trees | Total
----------------------------------------------+---------------------
Funnel | 405ms
DartFormatter | 303ms
@pkozlowski-opensource
pkozlowski-opensource / gist:5a57d28ccfeacaba7661
Last active August 29, 2015 14:11
$http and request param serialisation issues

Issues description

"Hard-coded" serialization format for request parameters

The current version of the $http service has a hard-coded way of serializing request parameters. This one-and-only-one way of doing things causes practical problems to people using backends that have different serialziation schemas (mostly Rails and PHP).

More specifically, given this $http call:

$http.get('http://google.com', {params: {foo: [1 ,2], bar: 'sth;else'}});

(written by @pawel)

We've got a number of bug reports opened for the $dialog service and while some of them can be fixed by (relatively) simple changes to the existing code-base some other are difficult to solve due to the way current code is structured. Additionally the existing API would benefit from some some simplifications.

This docs aims to list existing issues and propose a new API plus some implementations details that would address existing issues.

As a remainder, docs for the current service are located here: https://github.com/angular-ui/bootstrap/blob/master/src/dialog/README.md

Known issues

API

@pkozlowski-opensource
pkozlowski-opensource / gist:4998969
Last active November 12, 2018 06:33
AngularJS Typeahead interface design

Examples

Simple, static array

 $scope.states = ['Alabama', 'California', 'Delaware', ...] 

would be used as:

<input ng-model='state' typeahead='states | filter:$viewValue'>
@pkozlowski-opensource
pkozlowski-opensource / angular.issue856.js
Created July 7, 2012 17:15
angular.js built after fixing #856
/**
* @license AngularJS v1.0.2-a8b04004
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////