Skip to content

Commit

Permalink
feat(playground): use relative paths with moduleId where templateUrl …
Browse files Browse the repository at this point in the history
…is used
  • Loading branch information
Hotell committed Jun 16, 2016
1 parent f438de6 commit afe32d0
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
3 changes: 2 additions & 1 deletion playground/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { AsyncExampleComponent } from './components/async-example/async-example.
@Component( {
selector: 'my-app',
directives: [ TodoAppCmp, AsyncExampleComponent ],
templateUrl: './app/app.component.html'
moduleId: module.id,
templateUrl: './app.component.html'
} )
export class AppComponent implements OnInit {
constructor(
Expand Down
3 changes: 2 additions & 1 deletion playground/app/components/lifecycle/do-check.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export class DoCheckComponent implements DoCheck, OnChanges {

@Component({
selector: 'do-check-parent',
templateUrl: 'app/components/lifecycle/do-check-parent.component.html',
moduleId: module.id,
templateUrl: './do-check-parent.component.html',
directives: [DoCheckComponent]
})
export class DoCheckParentComponent {
Expand Down
3 changes: 2 additions & 1 deletion playground/app/components/lifecycle/on-changes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export class OnChangesComponent implements OnChanges {

@Component({
selector: 'on-changes-parent',
templateUrl: 'app/components/lifecycle/on-changes-parent.component.html',
moduleId: module.id,
templateUrl: './on-changes-parent.component.html',
directives: [OnChangesComponent]
})
export class OnChangesParentComponent {
Expand Down
3 changes: 2 additions & 1 deletion playground/app/todo/add-todo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { TodoModel } from './todo-store.service.ts';

@Component({
selector: 'add-todo',
templateUrl: './app/todo/add-todo.html'
moduleId: module.id,
templateUrl: './add-todo.html'
})
export class AddTodoCmp{

Expand Down
3 changes: 2 additions & 1 deletion playground/app/todo/todo-app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { RemainingTodosPipe } from './remaining-todos.pipe'

@Component( {
selector: 'todo-app',
templateUrl: './app/todo/todo-app.html',
moduleId: module.id,
templateUrl: './todo-app.html',
directives: [ AddTodoCmp, TodoItemCmp ],
providers: [ TodoStore ],
pipes: [ RemainingTodosPipe ],
Expand Down
3 changes: 2 additions & 1 deletion playground/app/todo/todo-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { TodoModel } from './todo-store.service';

@Component({
selector: 'todo-item',
templateUrl: './app/todo/todo-item.html',
moduleId: module.id,
templateUrl: './todo-item.html',
legacy: {
transclude: true
}
Expand Down
5 changes: 3 additions & 2 deletions playground/ng-metadata.legacy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export const enum ChangeDetectionStrategy {
outputs?: string[],
providers?: Function[],
}): ClassDecorator;
function Component({selector, template, templateUrl, inputs, attrs, outputs, legacy, changeDetection, directives}: {
function Component({selector, template, templateUrl, inputs, attrs, outputs, legacy, changeDetection, directives, moduleId}: {
selector: string;
template?: string;
templateUrl?: string;
Expand All @@ -324,7 +324,8 @@ export const enum ChangeDetectionStrategy {
directives?: Function[],
providers?: Function[],
viewProviders?: Function[],
pipes?: Function[]
pipes?: Function[],
moduleId?: string
}): ClassDecorator;
function Output(bindingPropertyName?: string): PropertyDecorator;
function Input(bindingPropertyName?: string): PropertyDecorator;
Expand Down

0 comments on commit afe32d0

Please sign in to comment.