Skip to content

Commit b0e01af

Browse files
committed
Merge branch 'canary' into canary-fixes
2 parents 3f7e2b4 + 451e4b6 commit b0e01af

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Diff for: src/generators/generator-base.js

+7
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ export class Base extends YoBase {
4848
to() {
4949
return this.filters.expect ? ').to' : '.should';
5050
}
51+
52+
public() {
53+
return this.filters.ts ? 'public ' : '';
54+
}
55+
private() {
56+
return this.filters.ts ? 'private ' : '';
57+
}
5158
}
5259

5360
export class NamedBase extends Base {

Diff for: templates/app/client/app/main/main.component.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ import { SocketService } from '../../components/socket/socket.service';
99
styles: [require('./main.<%=styleExt%>')],
1010
})
1111
export class MainComponent implements OnInit<% if(filters.socketio) { %>, OnDestroy<% } %> {
12-
Http;
1312
<%_ if(filters.socketio) { -%>
1413
SocketService;<% } %>
1514
awesomeThings = [];
1615
<%_ if(filters.models) { -%>
1716
newThing = '';<% } %>
1817

19-
static parameters = [Http, SocketService];
20-
constructor(_Http_: Http<% if(filters.socketio) { %>, _SocketService_: SocketService<% } %>) {
21-
this.Http = _Http_;
18+
<%_ if(filters.babel) { -%>
19+
static parameters = [Http, SocketService];<% } %>
20+
constructor(<%= private() %>http: Http<% if(filters.socketio) { %>, <%= private() %>socketService: SocketService<% } %>) {
21+
this.Http = http;
2222
<%_ if(filters.socketio) { -%>
23-
this.SocketService = _SocketService_;<% } %>
23+
this.SocketService = socketService;<% } %>
2424
}
2525

2626
ngOnInit() {

0 commit comments

Comments
 (0)