refactor(pipes): removed pipes from properties

BREAKING CHANGE:

This PR remove an ability to use pipes in the properties config. Instead, inject the pipe registry.
This commit is contained in:
vsavkin
2015-06-18 15:40:12 -07:00
parent ad7aca631d
commit 20a8f0dbe5
31 changed files with 261 additions and 270 deletions

View File

@ -86,17 +86,6 @@ export function main() {
expect(directiveBinding.propertyBindings.get('dirProp').source).toEqual('someExpr');
});
it('should bind directive properties with pipes', () => {
var results = process(el('<div some-decor-props></div>'),
{'elProp': parser.parseBinding('someExpr', '')});
var directiveBinding = results[0].directives[0];
var pipedProp = <any>directiveBinding.propertyBindings.get('doubleProp');
var simpleProp = <any>directiveBinding.propertyBindings.get('dirProp');
expect(pipedProp.ast.name).toEqual('double');
expect(pipedProp.ast.exp).toEqual(simpleProp.ast);
expect(simpleProp.source).toEqual('someExpr');
});
it('should bind directive properties from attribute values', () => {
var results = process(el('<div some-decor-props el-prop="someValue"></div>'));
var directiveBinding = results[0].directives[0];
@ -237,7 +226,7 @@ var decoratorWithMultipleAttrs = DirectiveMetadata.create({
var someDirectiveWithProps = DirectiveMetadata.create({
selector: '[some-decor-props]',
properties: ['dirProp: elProp', 'doubleProp: elProp | double'],
properties: ['dirProp: elProp'],
readAttributes: ['some-attr']
});