feat(transformers): provide a flag to disable inlining views

Add a flag to allow a user to disable inlining css/html content into the views.

Closes #2658
This commit is contained in:
Ted Sander
2015-06-20 18:09:23 -07:00
committed by Tobias Bosch
parent 34eaf65a79
commit dcdd73065a
12 changed files with 121 additions and 34 deletions

View File

@ -0,0 +1,25 @@
library examples.src.hello_world.index_common_dart.ng_deps.dart;
import 'hello.dart';
import 'package:angular2/angular2.dart'
show bootstrap, Component, Directive, View, NgElement;
var _visited = false;
void initReflector(reflector) {
if (_visited) return;
_visited = true;
reflector
..registerType(HelloCmp, {
'factory': () => new HelloCmp(),
'parameters': const [],
'annotations': const [
const Component(selector: 'hello-app'),
const View(
template: r'''{{greeting}}''',
styles: const [
r'''.greeting { .color: blue; }''',
r'''.hello { .color: red; }''',
])
]
});
}