angular / angular.js Goto Github PK
View Code? Open in Web Editor NEWAngularJS - HTML enhanced for web apps!
Home Page: https://angularjs.org
License: MIT License
AngularJS - HTML enhanced for web apps!
Home Page: https://angularjs.org
License: MIT License
Per discussion parse() could be updated to do that, but "parse" is not a very clear name for what a developer is attempting to do.
"update" or "navigate" would both be much more clear.
HTML like filter which is script injection safe. See if we can reuse the implementation from here: http://code.google.com/p/google-caja/wiki/JsHtmlSanitizer
There is a gist with error code: http://gist.github.com/622956
this[0].parentNode is null [jgLite.js, line 155]
http://github.com/angular/angular.js/blob/master/src/jqLite.js#L155
With jQuery, it works fine.
Requirements
Example of the problem:
Example: http://gist.github.com/587658
Example: http://gist.github.com/550405
We should create dump filter for displaying variables.
This filter should be able to dump even window or document object...
example:
<a href ng:click="doesntexist()">click here</a>
will just happily ignore the error in the expressions and not do anything, this is really bad when developer makes a typo on the expression.
ex.
angular.service('my', function() { return old; }, {$creation: 'eager-published'});
angular.service('my', function() { return new; }); // should still have $creation of eager-published
in the getterFn method I see the following line:
fn = eval('fn = ' + code);
I think it would be better if it was
fn = new Function(code,'key');
instead of:
585ms navigate to ../personalLog.html
15ms input 'newMsg' enter 'my first message'
51ms element form input[type="submit"] click
4ms repeater ul li count
4ms expect repeater ul li count toEqual 1
I'd like to see line numbers from my spec file next to each (or at least next to each failing) step like this:
585ms #20 navigate to ../personalLog.html
15ms #34 input 'newMsg' enter 'my first message'
51ms #35 element form input[type="submit"] click
4ms #37 repeater ul li count
4ms #38 expect repeater ul li count toEqual 1
This would allow me to locate failing steps a lot faster than now when I have to compare strings in the runner with code in the spec.
The only way to retrieve the text of an element at the moment is by using .query(), which is overly complex for such a simple operation.
.text() should return the trimmed text of the element.
expect(element('ul li').text()).toEqual('some text')
expect(element('ul li').html()).toEqual('<b>some text</b>)
Requirements
given that most of the other methods (all the other methods?) are camelcased, having foreach lowercased is really annoying.
How to inline images in IE6/7?
http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/
in the getterFn method I see the following line:
fn = eval('fn = ' + code);
I think it would be better if it was
fn = new Function(code,'key');
We should consider updating jasmine, as there are some new methods for mocking (spying)...
http://pivotal.github.com/jasmine/release-notes.html
(we are still using 0.10.3)
key of http://angularjs.org rather then 'ng:'
the target should create an archive (zip?) that will contain:
Current behavior:
http://www.angularjs.org/ -> host=www.angularjs.org
!!! http://www.angularjs.org -> host=www.angularjs.or
!!! http://www.angularjs.org#xx -> host=www.angularjs.or
We should add tests for URL_MATCHER, it's bad idea to test it through $location service (with scope, etc...)
41/1/2009 is not a valid date, but the validator let it pass.
See
http://angularjs.org/Validator:date
to reproduce the bug.
create a new scope for each ng:controller instance so that we can nest controllers on the same page.
Currently, there is no way to find out the current URL on an end-to-end test.
Elliot's draft on this feature:
angular.scenario.dsl('applicationUrl', function() {
return function() {
this.addFutureAction('get application url', function($window, $document, done) {
done(null, $window.location.href);
});
};
});
expect(applicationUrl()).toEqual('...')
readString consumes invalid escapes:
string += String.fromCharCode(parseInt(hex, 16));
hex is not verified to be a valid string, the parser should throw an error the following string ({"x":["\u1","Secret"]})
in any angular app open the main html and append # to it in the address bar and open the page. e.g. file://..../example/temp.html#
the browser will keep on reloading the page like crazy.
No routes definition or onChange handlers are needed for this to be reproducible. Affects all browsers.
As mentioned before, the use of the Parser to serialize JSON is not safe. The following code will execute:
angular.fromJson("{'res':([1,2,3]['constructor']'constructor'())}").res
If the JSON string happened to be user-supplied it would execute code. An approach similar to json.org should be used.
there are two issues:
1/ failure to parse string with escaped double quote ("), e.g. "
20:46:29:659: Lexer Error: Unexpected next character ["asdfasdf""}]] in expression '[{"at":1287891981735,"msg":"what?"},{"at":1287891984055,"msg":"lala"},{"at":1287891988278,"msg":"haha"asdfasdf""}]' at column '102.00000000000003'.
2/ failure to parse string with single quote ('), e.g. {"at":1287875160522,"msg":"what's up?"}
20:45:00:634: Lexer Error: Unterminated quote ['s up?"}]] starting at column '72.00000000000003' in expression '[{"at":1287875144138,"msg":"ate lunch"},{"at":1287875160522,"msg":"what's up?"}]'.
the ng:comipled flag is a common paradigm which should not be needed, as it is a common problem when delay compiling code.
http://github.com/angular/angular.js/blob/master/src/widgets.js#L247
Total 496 tests (Passed: 494; Fails: 2; Errors: 0) (1313.00 ms)
Firefox 3.6.11 Mac OS: Run 496 tests (Passed: 494; Fails: 2; Errors 0) (1313.00 ms)
filter date.test that it should accept format failed (3.00 ms): Expected '2010-9-4 12=0:5:8am0700' to equal '2010-9-3 12=0:5:8am0700'.
([object Object])@http://localhost:9876/test/lib/jasmine-jstd-adapter/JasmineAdapter.js:102
([object Object])@http://localhost:9876/test/lib/jasmine-1.0.1/jasmine.js:1909
("2010-9-3 12=0:5:8am0700")@http://localhost:9876/test/lib/jasmine-1.0.1/jasmine.js:1145
()@http://localhost:9876/test/test/FiltersSpec.js:115
()@http://localhost:9876/test/lib/jasmine-jstd-adapter/JasmineAdapter.js:70
filter date.test that it should accept miliseconds as date failed (3.00 ms): Expected '1970' to equal '1969'.
([object Object])@http://localhost:9876/test/lib/jasmine-jstd-adapter/JasmineAdapter.js:102
([object Object])@http://localhost:9876/test/lib/jasmine-1.0.1/jasmine.js:1909
("1969")@http://localhost:9876/test/lib/jasmine-1.0.1/jasmine.js:1145
()@http://localhost:9876/test/test/FiltersSpec.js:126
()@http://localhost:9876/test/lib/jasmine-jstd-adapter/JasmineAdapter.js:70
Based on in-line discussion from http://github.com/angular/angular.js/pull/75
ddescribe(..., function() {
iit() // only this one
it() // not this one
});
in the getterFn method I see the following line:
fn = eval('fn = ' + code);
I think it would be better if it was
fn = new Function(code,'key');
in the getterFn method I see the following line:
fn = eval('fn = ' + code);
I think it would be better if it was
fn = new Function(code,'key');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.