fix(transformer): fix 'pub build' in examples

This commit is contained in:
Sigmund Cherem
2015-07-09 13:59:36 -07:00
committed by yjbanov
parent 749d043258
commit 62589293aa
19 changed files with 38 additions and 21 deletions

View File

@ -269,6 +269,11 @@ class AnnotationsTransformVisitor extends ToSourceVisitor {
writer.print("template: r'''");
writer.asyncPrint(_readOrEmptyString(url));
writer.print("'''");
// We keep the templateUrl in case the body of the template includes
// relative urls that might be inlined later on (e.g. @import
// directives or url() css values in style tags).
writer.print(", templateUrl: r'$url'");
return null;
} else {
logger.warning('template url is not a String $url');

View File

@ -122,7 +122,7 @@ class _CodegenState {
localNames.map((name) => '_${name}_pipe').toList();
void _writeToBuf(StringBuffer buf) {
buf.write('''
buf.write('''\n
class $_changeDetectorTypeName extends $_BASE_CLASS {
final dynamic $_DISPATCHER_ACCESSOR;
$_GEN_PREFIX.PipeRegistry $_PIPE_REGISTRY_ACCESSOR;