diff --git a/addon/ng2/blueprints/ng2/files/src/app.ts b/addon/ng2/blueprints/ng2/files/src/app.ts index f752e09bdcc8..53b2cdfe9f4a 100644 --- a/addon/ng2/blueprints/ng2/files/src/app.ts +++ b/addon/ng2/blueprints/ng2/files/src/app.ts @@ -1,5 +1,14 @@ +import {provide} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; +import { + ROUTER_PROVIDERS, + HashLocationStrategy, + LocationStrategy +} from 'angular2/router'; + + import {<%= jsComponentName %>App} from './app/<%= htmlComponentName %>'; -bootstrap(<%= jsComponentName %>App); +bootstrap(<%= jsComponentName %>App, [ + ROUTER_PROVIDERS, provide(LocationStrategy, { useClass: HashLocationStrategy })]); diff --git a/addon/ng2/blueprints/ng2/files/src/app/__name__.html b/addon/ng2/blueprints/ng2/files/src/app/__name__.html index f206e8e44c93..07f981887829 100644 --- a/addon/ng2/blueprints/ng2/files/src/app/__name__.html +++ b/addon/ng2/blueprints/ng2/files/src/app/__name__.html @@ -1,3 +1,5 @@
<%= htmlComponentName %> Works! -
\ No newline at end of file + + +Hello works!
\ No newline at end of file diff --git a/addon/ng2/blueprints/ng2/files/src/app/components/hello/hello.ts b/addon/ng2/blueprints/ng2/files/src/app/components/hello/hello.ts new file mode 100644 index 000000000000..7b73cc80a7ea --- /dev/null +++ b/addon/ng2/blueprints/ng2/files/src/app/components/hello/hello.ts @@ -0,0 +1,9 @@ +import {Component} from 'angular2/core'; + +@Component({ + selector: 'hello-cmp', + templateUrl: 'app/components/hello/hello.html' +}) +export class HelloCmp { + +} \ No newline at end of file