Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

refactor(controller_typescript) use this instead of $scope #1188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions templates/typescript/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
'use strict';

module <%= scriptAppName %> {
export interface I<%= classedName %>Scope extends ng.IScope {
awesomeThings: any[];
}

export class <%= classedName %>Ctrl {

constructor (private $scope: I<%= classedName %>Scope) {
$scope.awesomeThings = [
public awesomeThings: string[] = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be array? not really sure since i havent used TypeScript though

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an array. Playground link.

'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
}
];
}
}

Expand Down