diff --git a/lib/core/annotation_src.dart b/lib/core/annotation_src.dart
index ee5270362..4e7675b5a 100644
--- a/lib/core/annotation_src.dart
+++ b/lib/core/annotation_src.dart
@@ -553,9 +553,9 @@ abstract class DetachAware {
* Usage:
*
* // Declaration
- * @Formatter(name:'myFilter')
- * class MyFilter {
- * call(valueToFilter, optArg1, optArg2) {
+ * @Formatter(name:'myFormatter')
+ * class MyFormatter {
+ * call(valueToFormat, optArg1, optArg2) {
* return ...;
* }
* }
@@ -563,11 +563,11 @@ abstract class DetachAware {
*
* // Registration
* var module = ...;
- * module.type(MyFilter);
+ * module.type(MyFormatter);
*
*
*
- * {{something | myFilter:arg1:arg2}}
+ * {{something | myFormatter:arg1:arg2}}
*/
class Formatter {
final String name;
diff --git a/lib/core/formatter.dart b/lib/core/formatter.dart
index 1762c28a6..99fa15f5d 100644
--- a/lib/core/formatter.dart
+++ b/lib/core/formatter.dart
@@ -12,9 +12,9 @@ class FormatterMap extends AnnotationMap {
super(injector, extractMetadata);
call(String name) {
- var filter = new Formatter(name: name);
- var filterType = this[filter];
- return _injector.get(filterType);
+ var formatter = new Formatter(name: name);
+ var formatterType = this[formatter];
+ return _injector.get(formatterType);
}
}
diff --git a/lib/core/module.dart b/lib/core/module.dart
index c4326f22b..57b7b2970 100644
--- a/lib/core/module.dart
+++ b/lib/core/module.dart
@@ -61,7 +61,6 @@ export "package:angular/core_dom/module_internal.dart" show
export "package:angular/core/module_internal.dart" show
CacheStats,
ExceptionHandler,
- FilterMap,
Interpolate,
VmTurnZone,
PrototypeMap,
diff --git a/lib/core/module_internal.dart b/lib/core/module_internal.dart
index 13042e70f..203954bc6 100644
--- a/lib/core/module_internal.dart
+++ b/lib/core/module_internal.dart
@@ -18,7 +18,7 @@ export 'package:angular/change_detection/watch_group.dart';
import 'package:angular/change_detection/change_detection.dart';
import 'package:angular/change_detection/dirty_checking_change_detector.dart';
import 'package:angular/core/parser/utils.dart';
-import 'package:angular/core/parser/syntax.dart';
+import 'package:angular/core/parser/syntax.dart' as syntax;
import 'package:angular/core/registry.dart';
part "cache.dart";
diff --git a/lib/core/parser/dynamic_parser.dart b/lib/core/parser/dynamic_parser.dart
index 57b88be83..041ebb33d 100644
--- a/lib/core/parser/dynamic_parser.dart
+++ b/lib/core/parser/dynamic_parser.dart
@@ -1,6 +1,6 @@
library angular.core.parser.dynamic_parser;
-import 'package:angular/core/annotation_src.dart';
+import 'package:angular/core/annotation_src.dart' hide Formatter;
import 'package:angular/core/module_internal.dart' show FormatterMap;
import 'package:angular/core/parser/parser.dart';
@@ -72,11 +72,11 @@ class DynamicParserBackend extends ParserBackend {
bool isAssignable(Expression expression) => expression.isAssignable;
- Expression newFilter(expression, name, arguments) {
+ Expression newFormatter(expression, name, arguments) {
List allArguments = new List(arguments.length + 1);
allArguments[0] = expression;
allArguments.setAll(1, arguments);
- return new Filter(expression, name, arguments, allArguments);
+ return new Formatter(expression, name, arguments, allArguments);
}
Expression newChain(expressions) => new Chain(expressions);
diff --git a/lib/core/parser/dynamic_parser_impl.dart b/lib/core/parser/dynamic_parser_impl.dart
index 60c6a004c..9d8712413 100644
--- a/lib/core/parser/dynamic_parser_impl.dart
+++ b/lib/core/parser/dynamic_parser_impl.dart
@@ -32,12 +32,12 @@ class DynamicParserImpl {
next.isCharacter($RBRACKET)) {
error('Unconsumed token $next');
}
- var expr = parseFilter();
+ var expr = parseFormatter();
expressions.add(expr);
while (optionalCharacter($SEMICOLON)) {
isChain = true;
}
- if (isChain && expr is Filter) {
+ if (isChain && expr is Formatter) {
error('Cannot have a formatter in a chain');
}
if (!isChain && index < tokens.length) {
@@ -49,7 +49,7 @@ class DynamicParserImpl {
: backend.newChain(expressions);
}
- parseFilter() {
+ parseFormatter() {
var result = parseExpression();
while (optionalOperator('|')) {
String name = expectIdentifierOrKeyword();
@@ -58,7 +58,7 @@ class DynamicParserImpl {
// TODO(kasperl): Is this really supposed to be expressions?
arguments.add(parseExpression());
}
- result = backend.newFilter(result, name, arguments);
+ result = backend.newFormatter(result, name, arguments);
}
return result;
}
@@ -217,7 +217,7 @@ class DynamicParserImpl {
parsePrimary() {
if (optionalCharacter($LPAREN)) {
- var result = parseFilter();
+ var result = parseFormatter();
expectCharacter($RPAREN);
return result;
} else if (next.isKeywordNull || next.isKeywordUndefined) {
diff --git a/lib/core/parser/eval.dart b/lib/core/parser/eval.dart
index 22ba2ac93..c8d3ce3c9 100644
--- a/lib/core/parser/eval.dart
+++ b/lib/core/parser/eval.dart
@@ -19,9 +19,9 @@ class Chain extends syntax.Chain {
}
}
-class Filter extends syntax.Filter {
+class Formatter extends syntax.Formatter {
final List allArguments;
- Filter(syntax.Expression expression, String name, List arguments,
+ Formatter(syntax.Expression expression, String name, List arguments,
this.allArguments)
: super(expression, name, arguments);
diff --git a/lib/core/parser/parser.dart b/lib/core/parser/parser.dart
index 729b20af1..0f9839cd0 100644
--- a/lib/core/parser/parser.dart
+++ b/lib/core/parser/parser.dart
@@ -23,7 +23,7 @@ abstract class ParserBackend {
bool isAssignable(T expression);
T newChain(List expressions) => null;
- T newFilter(T expression, String name, List arguments) => null;
+ T newFormatter(T expression, String name, List arguments) => null;
T newAssign(T target, T value) => null;
T newConditional(T condition, T yes, T no) => null;
diff --git a/lib/core/parser/syntax.dart b/lib/core/parser/syntax.dart
index 8c1a9cd05..e4393860c 100644
--- a/lib/core/parser/syntax.dart
+++ b/lib/core/parser/syntax.dart
@@ -10,7 +10,7 @@ abstract class Visitor {
visitExpression(Expression expression) => null;
visitChain(Chain expression) => visitExpression(expression);
- visitFilter(Filter expression) => visitExpression(expression);
+ visitFormatter(Formatter expression) => visitExpression(expression);
visitAssign(Assign expression) => visitExpression(expression);
visitConditional(Conditional expression) => visitExpression(expression);
@@ -73,12 +73,12 @@ class Chain extends Expression {
accept(Visitor visitor) => visitor.visitChain(this);
}
-class Filter extends Expression {
+class Formatter extends Expression {
final Expression expression;
final String name;
final List arguments;
- Filter(this.expression, this.name, this.arguments);
- accept(Visitor visitor) => visitor.visitFilter(this);
+ Formatter(this.expression, this.name, this.arguments);
+ accept(Visitor visitor) => visitor.visitFormatter(this);
}
class Assign extends Expression {
diff --git a/lib/core/parser/unparser.dart b/lib/core/parser/unparser.dart
index 906e4b912..e050f921c 100644
--- a/lib/core/parser/unparser.dart
+++ b/lib/core/parser/unparser.dart
@@ -41,13 +41,13 @@ class Unparser extends Visitor {
}
}
- void visitFilter(Filter filter) {
+ void visitFormatter(Formatter formatter) {
write('(');
- visit(filter.expression);
- write('|${filter.name}');
- for (int i = 0; i < filter.arguments.length; i++) {
+ visit(formatter.expression);
+ write('|${formatter.name}');
+ for (int i = 0; i < formatter.arguments.length; i++) {
write(' :');
- visit(filter.arguments[i]);
+ visit(formatter.arguments[i]);
}
write(')');
}
diff --git a/lib/core/scope.dart b/lib/core/scope.dart
index 128cf77e9..f2986d729 100644
--- a/lib/core/scope.dart
+++ b/lib/core/scope.dart
@@ -1061,7 +1061,7 @@ class _AstParser {
}
}
-class ExpressionVisitor implements Visitor {
+class ExpressionVisitor implements syntax.Visitor {
static final ContextReferenceAST scopeContextRef = new ContextReferenceAST();
final ClosureMap _closureMap;
AST contextRef = scopeContextRef;
@@ -1072,7 +1072,7 @@ class ExpressionVisitor implements Visitor {
AST ast;
FormatterMap formatters;
- AST visit(Expression exp) {
+ AST visit(syntax.Expression exp) {
exp.accept(this);
assert(ast != null);
try {
@@ -1082,68 +1082,68 @@ class ExpressionVisitor implements Visitor {
}
}
- AST visitCollection(Expression exp) => new CollectionAST(visit(exp));
- AST _mapToAst(Expression expression) => visit(expression);
+ AST visitCollection(syntax.Expression exp) => new CollectionAST(visit(exp));
+ AST _mapToAst(syntax.Expression expression) => visit(expression);
- List _toAst(List expressions) =>
+ List _toAst(List expressions) =>
expressions.map(_mapToAst).toList();
- Map _toAstMap(Map expressions) {
+ Map _toAstMap(Map expressions) {
if (expressions.isEmpty) return const {};
Map result = new Map();
- expressions.forEach((String name, Expression expression) {
+ expressions.forEach((String name, syntax.Expression expression) {
result[_closureMap.lookupSymbol(name)] = _mapToAst(expression);
});
return result;
}
- void visitCallScope(CallScope exp) {
+ void visitCallScope(syntax.CallScope exp) {
List positionals = _toAst(exp.arguments.positionals);
Map named = _toAstMap(exp.arguments.named);
ast = new MethodAST(contextRef, exp.name, positionals, named);
}
- void visitCallMember(CallMember exp) {
+ void visitCallMember(syntax.CallMember exp) {
List positionals = _toAst(exp.arguments.positionals);
Map named = _toAstMap(exp.arguments.named);
ast = new MethodAST(visit(exp.object), exp.name, positionals, named);
}
- visitAccessScope(AccessScope exp) {
+ void visitAccessScope(syntax.AccessScope exp) {
ast = new FieldReadAST(contextRef, exp.name);
}
- visitAccessMember(AccessMember exp) {
+ void visitAccessMember(syntax.AccessMember exp) {
ast = new FieldReadAST(visit(exp.object), exp.name);
}
- visitBinary(Binary exp) {
+ void visitBinary(syntax.Binary exp) {
ast = new PureFunctionAST(exp.operation,
_operationToFunction(exp.operation),
[visit(exp.left), visit(exp.right)]);
}
- void visitPrefix(Prefix exp) {
+ void visitPrefix(syntax.Prefix exp) {
ast = new PureFunctionAST(exp.operation,
_operationToFunction(exp.operation),
[visit(exp.expression)]);
}
- void visitConditional(Conditional exp) {
+ void visitConditional(syntax.Conditional exp) {
ast = new PureFunctionAST('?:', _operation_ternary,
[visit(exp.condition), visit(exp.yes),
visit(exp.no)]);
}
- void visitAccessKeyed(AccessKeyed exp) {
+ void visitAccessKeyed(syntax.AccessKeyed exp) {
ast = new ClosureAST('[]', _operation_bracket,
[visit(exp.object), visit(exp.key)]);
}
- void visitLiteralPrimitive(LiteralPrimitive exp) {
+ void visitLiteralPrimitive(syntax.LiteralPrimitive exp) {
ast = new ConstantAST(exp.value);
}
- void visitLiteralString(LiteralString exp) {
+ void visitLiteralString(syntax.LiteralString exp) {
ast = new ConstantAST(exp.value);
}
- void visitLiteralArray(LiteralArray exp) {
+ void visitLiteralArray(syntax.LiteralArray exp) {
List items = _toAst(exp.elements);
ast = new PureFunctionAST('[${items.join(', ')}]', new ArrayFn(), items);
}
- void visitLiteralObject(LiteralObject exp) {
+ void visitLiteralObject(syntax.LiteralObject exp) {
List keys = exp.keys;
List values = _toAst(exp.values);
assert(keys.length == values.length);
@@ -1154,31 +1154,31 @@ class ExpressionVisitor implements Visitor {
ast = new PureFunctionAST('{${kv.join(', ')}}', new MapFn(keys), values);
}
- void visitFilter(Filter exp) {
+ void visitFormatter(syntax.Formatter exp) {
if (formatters == null) {
throw new Exception("No formatters have been registered");
}
- Function filterFunction = formatters(exp.name);
+ Function formatterFunction = formatters(exp.name);
List args = [visitCollection(exp.expression)];
args.addAll(_toAst(exp.arguments).map((ast) => new CollectionAST(ast)));
ast = new PureFunctionAST('|${exp.name}',
- new _FilterWrapper(filterFunction, args.length), args);
+ new _FormatterWrapper(formatterFunction, args.length), args);
}
// TODO(misko): this is a corner case. Choosing not to implement for now.
- void visitCallFunction(CallFunction exp) {
+ void visitCallFunction(syntax.CallFunction exp) {
_notSupported("function's returing functions");
}
- void visitAssign(Assign exp) {
+ void visitAssign(syntax.Assign exp) {
_notSupported('assignement');
}
- void visitLiteral(Literal exp) {
+ void visitLiteral(syntax.Literal exp) {
_notSupported('literal');
}
- void visitExpression(Expression exp) {
+ void visitExpression(syntax.Expression exp) {
_notSupported('?');
}
- void visitChain(Chain exp) {
+ void visitChain(syntax.Chain exp) {
_notSupported(';');
}
@@ -1249,11 +1249,11 @@ class MapFn extends FunctionApply {
}
}
-class _FilterWrapper extends FunctionApply {
- final Function filterFn;
+class _FormatterWrapper extends FunctionApply {
+ final Function formatterFn;
final List args;
final List argsWatches;
- _FilterWrapper(this.filterFn, length):
+ _FormatterWrapper(this.formatterFn, length):
args = new List(length),
argsWatches = new List(length);
@@ -1271,7 +1271,7 @@ class _FilterWrapper extends FunctionApply {
}
}
}
- var value = Function.apply(filterFn, args);
+ var value = Function.apply(formatterFn, args);
if (value is Iterable) {
// Since formatters are pure we can guarantee that this well never change.
// By wrapping in UnmodifiableListView we can hint to the dirty checker
diff --git a/lib/core_dom/common.dart b/lib/core_dom/common.dart
index bd71f3c3e..db0e2173d 100644
--- a/lib/core_dom/common.dart
+++ b/lib/core_dom/common.dart
@@ -35,7 +35,7 @@ class DirectiveRef {
* Creates a child injector that allows loading new directives, formatters and
* services from the provided modules.
*/
-Injector forceNewDirectivesAndFilters(Injector injector, List modules) {
+Injector forceNewDirectivesAndFormatters(Injector injector, List modules) {
modules.add(new Module()
..factory(Scope, (i) {
var scope = i.parent.get(Scope);
diff --git a/lib/directive/ng_repeat.dart b/lib/directive/ng_repeat.dart
index 5f4515df6..99e7d93e9 100644
--- a/lib/directive/ng_repeat.dart
+++ b/lib/directive/ng_repeat.dart
@@ -35,7 +35,7 @@ part of angular.directive;
* specified the ng-repeat associates elements by identity in the collection.
* It is an error to have more than one tracking function to resolve to the
* same key. (This would mean that two distinct objects are mapped to the same
- * DOM element, which is not possible.) Filters should be applied to the
+ * DOM element, which is not possible.) Formatters should be applied to the
* expression, before specifying a tracking expression.
*
* For example: `item in items` is equivalent to `item in items track by
diff --git a/lib/routing/ng_view.dart b/lib/routing/ng_view.dart
index 342bb07d9..c4d09004a 100644
--- a/lib/routing/ng_view.dart
+++ b/lib/routing/ng_view.dart
@@ -116,7 +116,7 @@ class NgView implements DetachAware, RouteProvider {
var viewInjector = modules == null ?
_injector :
- forceNewDirectivesAndFilters(_injector, modules);
+ forceNewDirectivesAndFormatters(_injector, modules);
var newDirectives = viewInjector.get(DirectiveMap);
var viewFuture = viewDef.templateHtml != null ?
diff --git a/test/core/parser/parser_spec.dart b/test/core/parser/parser_spec.dart
index 0957470a1..827686a43 100644
--- a/test/core/parser/parser_spec.dart
+++ b/test/core/parser/parser_spec.dart
@@ -52,13 +52,13 @@ main() {
FormatterMap formatters;
beforeEachModule((Module module) {
- module.type(IncrementFilter);
- module.type(SubstringFilter);
+ module.type(IncrementFormatter);
+ module.type(SubstringFormatter);
});
- beforeEach((Parser injectedParser, FormatterMap injectedFilters) {
+ beforeEach((Parser injectedParser, FormatterMap injectedFormatters) {
parser = injectedParser;
- formatters = injectedFilters;
+ formatters = injectedFormatters;
});
eval(String text, [FormatterMap f]) =>
@@ -1145,12 +1145,12 @@ main() {
}).toThrow('No Formatter: hello found!');
var module = new Module()
- ..type(HelloFilter);
+ ..type(HelloFormatter);
var childInjector = injector.createChild([module],
forceNewInstances: [FormatterMap]);
- var newFilters = childInjector.get(FormatterMap);
+ var newFormatters = childInjector.get(FormatterMap);
- expect(expression.eval({}, newFilters)).toEqual('Hello, World!');
+ expect(expression.eval({}, newFormatters)).toEqual('Hello, World!');
});
it('should not allow formatters in a chain', () {
@@ -1198,19 +1198,19 @@ class ScopeWithErrors {
}
@Formatter(name:'increment')
-class IncrementFilter {
+class IncrementFormatter {
call(a, b) => a + b;
}
@Formatter(name:'substring')
-class SubstringFilter {
+class SubstringFormatter {
call(String str, startIndex, [endIndex]) {
return str.substring(startIndex, endIndex);
}
}
@Formatter(name:'hello')
-class HelloFilter {
+class HelloFormatter {
call(String str) {
return 'Hello, $str!';
}
diff --git a/test/core/scope_spec.dart b/test/core/scope_spec.dart
index c0db2d4f4..0900c5ba1 100644
--- a/test/core/scope_spec.dart
+++ b/test/core/scope_spec.dart
@@ -15,11 +15,11 @@ void main() {
..value(Object, context)
..value(Map, context)
..type(RootScope)
- ..type(_MultiplyFilter)
- ..type(_ListHeadFilter)
- ..type(_ListTailFilter)
- ..type(_SortFilter)
- ..type(_IdentityFilter)
+ ..type(_MultiplyFormatter)
+ ..type(_ListHeadFormatter)
+ ..type(_ListTailFormatter)
+ ..type(_SortFormatter)
+ ..type(_IdentityFormatter)
..type(_MapKeys)
..type(ScopeStatsEmitter, implementedBy: MockScopeStatsEmitter);
});
@@ -1537,9 +1537,9 @@ void main() {
}
@Formatter(name: 'identity')
-class _IdentityFilter {
+class _IdentityFormatter {
Logger logger;
- _IdentityFilter(this.logger);
+ _IdentityFormatter(this.logger);
call(v) {
logger('identity');
return v;
@@ -1557,14 +1557,14 @@ class _MapKeys {
}
@Formatter(name: 'multiply')
-class _MultiplyFilter {
+class _MultiplyFormatter {
call(a, b) => a * b;
}
@Formatter(name: 'listHead')
-class _ListHeadFilter {
+class _ListHeadFormatter {
Logger logger;
- _ListHeadFilter(this.logger);
+ _ListHeadFormatter(this.logger);
call(list, head) {
logger('listHead');
return [head]..addAll(list);
@@ -1572,9 +1572,9 @@ class _ListHeadFilter {
}
@Formatter(name: 'listTail')
-class _ListTailFilter {
+class _ListTailFormatter {
Logger logger;
- _ListTailFilter(this.logger);
+ _ListTailFormatter(this.logger);
call(list, tail) {
logger('listTail');
return new List.from(list)..add(tail);
@@ -1582,24 +1582,24 @@ class _ListTailFilter {
}
@Formatter(name: 'sort')
-class _SortFilter {
+class _SortFormatter {
Logger logger;
- _SortFilter(this.logger);
+ _SortFormatter(this.logger);
call(list) {
logger('sort');
return new List.from(list)..sort();
}
}
-@Formatter(name:'newFilter')
-class FilterOne {
+@Formatter(name:'newFormatter')
+class FormatterOne {
call(String str) {
return '$str 1';
}
}
-@Formatter(name:'newFilter')
-class FilterTwo {
+@Formatter(name:'newFormatter')
+class FormatterTwo {
call(String str) {
return '$str 2';
}
diff --git a/test/core_dom/compiler_spec.dart b/test/core_dom/compiler_spec.dart
index f86eea9aa..45d036118 100644
--- a/test/core_dom/compiler_spec.dart
+++ b/test/core_dom/compiler_spec.dart
@@ -233,7 +233,7 @@ void main() {
..type(SometimesComponent)
..type(ExprAttrComponent)
..type(LogElementComponent)
- ..type(SayHelloFilter);
+ ..type(SayHelloFormatter);
});
it('should select on element', async(() {
@@ -1039,7 +1039,7 @@ class MissingSelector {}
class InvalidSelector {}
@Formatter(name:'hello')
-class SayHelloFilter {
+class SayHelloFormatter {
call(String str) {
return 'Hello, $str!';
}
diff --git a/test/core_dom/mustache_spec.dart b/test/core_dom/mustache_spec.dart
index 9b5b0403a..4d720f5d4 100644
--- a/test/core_dom/mustache_spec.dart
+++ b/test/core_dom/mustache_spec.dart
@@ -6,7 +6,7 @@ main() {
describe('ng-mustache', () {
TestBed _;
beforeEachModule((Module module) {
- module.type(_HelloFilter);
+ module.type(_HelloFormatter);
module.type(_FooDirective);
});
beforeEach(inject((TestBed tb) => _ = tb));
@@ -141,7 +141,7 @@ main() {
}
@Formatter(name: 'hello')
-class _HelloFilter {
+class _HelloFormatter {
call(String str) {
return 'Hello, $str!';
}
diff --git a/test/core_dom/view_spec.dart b/test/core_dom/view_spec.dart
index 678dc8000..01d0bd2f0 100644
--- a/test/core_dom/view_spec.dart
+++ b/test/core_dom/view_spec.dart
@@ -37,23 +37,23 @@ class BDirective {
}
}
-@Formatter(name:'filterA')
-class AFilter {
+@Formatter(name:'formatterA')
+class AFormatter {
Log log;
- AFilter(this.log) {
- log.add('AFilter');
+ AFormatter(this.log) {
+ log.add('AFormatter');
}
call(value) => value;
}
-@Formatter(name:'filterB')
-class BFilter {
+@Formatter(name:'formatterB')
+class BFormatter {
Log log;
- BFilter(this.log) {
- log.add('BFilter');
+ BFormatter(this.log) {
+ log.add('BFormatter');
}
call(value) => value;
@@ -197,7 +197,7 @@ main() {
Module rootModule = new Module()
..type(Probe)
..type(Log)
- ..type(AFilter)
+ ..type(AFormatter)
..type(ADirective)
..factory(Node, (injector) => document.body);
@@ -209,24 +209,24 @@ main() {
Compiler compiler = rootInjector.get(Compiler);
DirectiveMap directives = rootInjector.get(DirectiveMap);
- compiler(es('{{\'a\' | filterA}}'), directives)(rootInjector);
+ compiler(es('{{\'a\' | formatterA}}'), directives)(rootInjector);
rootScope.apply();
- expect(log.log, equals(['ADirective', 'AFilter']));
+ expect(log.log, equals(['ADirective', 'AFormatter']));
Module childModule = new Module()
- ..type(BFilter)
+ ..type(BFormatter)
..type(BDirective);
- var childInjector = forceNewDirectivesAndFilters(rootInjector, [childModule]);
+ var childInjector = forceNewDirectivesAndFormatters(rootInjector, [childModule]);
DirectiveMap newDirectives = childInjector.get(DirectiveMap);
- compiler(es('{{\'a\' | filterA}}'
- '{{\'b\' | filterB}}'), newDirectives)(childInjector);
+ compiler(es('{{\'a\' | formatterA}}'
+ '{{\'b\' | formatterB}}'), newDirectives)(childInjector);
rootScope.apply();
- expect(log.log, equals(['ADirective', 'AFilter', 'ADirective', 'BDirective', 'BFilter']));
+ expect(log.log, equals(['ADirective', 'AFormatter', 'ADirective', 'BDirective', 'BFormatter']));
});
});
diff --git a/test/routing/routing_spec.dart b/test/routing/routing_spec.dart
index 3d813d96f..f5c213dbd 100644
--- a/test/routing/routing_spec.dart
+++ b/test/routing/routing_spec.dart
@@ -304,7 +304,7 @@ main() {
'foo': ngRoute(
path: '/foo',
modules: () => [
- new Module()..type(HelloFilter)
+ new Module()..type(HelloFormatter)
],
view: 'foo.html'
),
@@ -329,7 +329,7 @@ main() {
'foo': ngRoute(
path: '/foo',
modules: () => new Future.value([
- new Module()..type(HelloFilter)
+ new Module()..type(HelloFormatter)
]),
view: 'foo.html'
),
@@ -366,7 +366,7 @@ class NewDirective {
}
@Formatter(name:'hello')
-class HelloFilter {
+class HelloFormatter {
String call(String str) {
return 'Hello, $str!';
}