diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin.Catalog.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin.Catalog.ng.ts
deleted file mode 100644
index 2af77e119e..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin.Catalog.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.Admin.Catalog {
- angular.module("MusicStore.Admin.Catalog", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModalController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModalController.ng.ts
deleted file mode 100644
index 97f175f70f..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModalController.ng.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-module MusicStore.Admin.Catalog {
- export interface IAlbumDeleteModalViewModel {
- album: Models.IAlbum;
- ok();
- cancel();
- }
-
- // We don't register this controller with Angular's DI system because the $modal service
- // will create and resolve its dependencies directly
-
- //@NgController(skip=true)
- export class AlbumDeleteModalController implements IAlbumDeleteModalViewModel {
- private _modalInstance: ng.ui.bootstrap.IModalServiceInstance;
-
- constructor($modalInstance: ng.ui.bootstrap.IModalServiceInstance, album: Models.IAlbum) {
- this._modalInstance = $modalInstance;
- this.album = album;
- }
-
- public album: Models.IAlbum;
-
- public ok() {
- this._modalInstance.close(true);
- }
-
- public cancel() {
- this._modalInstance.dismiss("cancel");
- }
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDetailsController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDetailsController.ng.ts
deleted file mode 100644
index 12c745d855..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumDetailsController.ng.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-///
-
-module MusicStore.Admin.Catalog {
- interface IAlbumDetailsRouteParams extends ng.route.IRouteParamsService {
- albumId: number;
- }
-
- interface IAlbumDetailsViewModel {
- album: Models.IAlbum;
- deleteAlbum();
- }
-
- class AlbumDetailsController implements IAlbumDetailsViewModel {
- private _modal: ng.ui.bootstrap.IModalService;
- private _location: ng.ILocationService;
- private _albumApi: AlbumApi.IAlbumApiService;
- private _viewAlert: ViewAlert.IViewAlertService;
-
- constructor($routeParams: IAlbumDetailsRouteParams,
- $modal: ng.ui.bootstrap.IModalService,
- $location: ng.ILocationService,
- albumApi: AlbumApi.IAlbumApiService,
- viewAlert: ViewAlert.IViewAlertService) {
-
- this._modal = $modal;
- this._location = $location;
- this._albumApi = albumApi;
- this._viewAlert = viewAlert;
-
- albumApi.getAlbumDetails($routeParams.albumId).then(album => this.album = album);
- }
-
- public album: Models.IAlbum;
-
- public deleteAlbum() {
- var deleteModal = this._modal.open({
- templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModal.cshtml",
- controller: "MusicStore.Admin.Catalog.AlbumDeleteModalController as viewModel",
- resolve: {
- album: () => this.album
- }
- });
-
- deleteModal.result.then(shouldDelete => {
- if (!shouldDelete) {
- return;
- }
-
- this._albumApi.deleteAlbum(this.album.AlbumId).then(result => {
- // Navigate back to the list
- this._viewAlert.alert = {
- type: Models.AlertType.success,
- message: result.data.Message
- };
- this._location.path("/albums").replace();
- });
- });
- }
- }
-
- angular.module("MusicStore.Admin.Catalog")
- .controller("MusicStore.Admin.Catalog.AlbumDetailsController", [
- "$routeParams",
- "$modal",
- "$location",
- "MusicStore.AlbumApi.IAlbumApiService",
- "MusicStore.ViewAlert.IViewAlertService",
- AlbumDetailsController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumEditController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumEditController.ng.ts
deleted file mode 100644
index c3b0248105..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumEditController.ng.ts
+++ /dev/null
@@ -1,205 +0,0 @@
-///
-
-module MusicStore.Admin.Catalog {
- interface IAlbumDetailsRouteParams extends ng.route.IRouteParamsService {
- mode: string;
- albumId: number;
- }
-
- interface IAlbumDetailsViewModel {
- mode: string; // edit or new
- disabled: boolean;
- album: Models.IAlbum;
- alert: Models.IAlert;
- artists: Array;
- genres: Array;
- save();
- clearAlert();
- }
-
- class AlbumEditController implements IAlbumDetailsViewModel {
- private _albumApi: AlbumApi.IAlbumApiService;
- private _artistApi: ArtistApi.IArtistApiService;
- private _genreApi: GenreApi.IGenreApiService;
- private _viewAlert: ViewAlert.IViewAlertService;
- private _modal: ng.ui.bootstrap.IModalService;
- private _location: ng.ILocationService;
- private _timeout: ng.ITimeoutService;
- private _log: ng.ILogService;
-
- constructor($routeParams: IAlbumDetailsRouteParams,
- albumApi: AlbumApi.IAlbumApiService,
- artistApi: ArtistApi.IArtistApiService,
- genreApi: GenreApi.IGenreApiService,
- viewAlert: ViewAlert.IViewAlertService,
- $modal: ng.ui.bootstrap.IModalService,
- $location: ng.ILocationService,
- $timeout: ng.ITimeoutService,
- $q: ng.IQService,
- $log: ng.ILogService) {
-
- this._albumApi = albumApi;
- this._artistApi = artistApi;
- this._genreApi = genreApi;
- this._viewAlert = viewAlert;
- this._modal = $modal;
- this._location = $location;
- this._timeout = $timeout;
- this._log = $log;
-
- this.mode = $routeParams.mode;
-
- this.alert = viewAlert.alert;
-
- artistApi.getArtistsLookup().then(artists => this.artists = artists);
- genreApi.getGenresLookup().then(genres => this.genres = genres);
-
- if (this.mode.toLowerCase() === "edit") {
- // TODO: Handle album load failure
- albumApi.getAlbumDetails($routeParams.albumId).then(album => {
- this.album = album;
-
- // Pre-load the lookup arrays with the current values if not set yet
- this.genres = this.genres || [album.Genre];
- this.artists = this.artists || [album.Artist];
-
- this.disabled = false;
- });
- } else {
- this.disabled = false;
- }
- }
-
- public mode: string;
-
- public disabled = true;
-
- public album: Models.IAlbum;
-
- public alert: Models.IAlert;
-
- public artists: Array;
-
- public genres: Array;
-
- public save() {
- this.disabled = true;
-
- var apiMethod = this.mode.toLowerCase() === "edit" ? this._albumApi.updateAlbum : this._albumApi.createAlbum;
- apiMethod = apiMethod.bind(this._albumApi);
-
- apiMethod(this.album).then(
- // Success
- response => {
- var alert = {
- type: Models.AlertType.success,
- message: response.data.Message
- };
-
- // TODO: Do we need to destroy this timeout on controller unload?
- this._timeout(() => this.alert !== alert || this.clearAlert(), 3000);
-
- if (this.mode.toLowerCase() === "new") {
- this._log.info("Created album successfully!");
-
- var albumId: number = response.data.Data;
-
- this._viewAlert.alert = alert;
-
- // Reload the view with the new album ID
- this._location.path("/albums/" + albumId + "/edit").replace();
- } else {
- this.alert = alert;
- this.disabled = false;
- this._log.info("Updated album " + this.album.AlbumId + " successfully!");
- }
- },
- // Error
- response => {
- // TODO: Make this common logic, e.g. base controller class, injected helper service, etc.
- if (response.status === 400) {
- // We made a bad request
- if (response.data && response.data.ModelErrors) {
- // The server says the update failed validation
- // TODO: Map errors back to client validators and/or summary
- this.alert = {
- type: Models.AlertType.danger,
- message: response.data.Message,
- modelErrors: response.data.ModelErrors
- };
- this.disabled = false;
- } else {
- // Some other bad request, just show the message
- this.alert = {
- type: Models.AlertType.danger,
- message: response.data.Message
- };
- }
- } else if (response.status === 404) {
- // The album wasn't found, probably deleted. Leave the form disabled and show error message.
- this.alert = {
- type: Models.AlertType.danger,
- message: response.data.Message
- };
- } else if (response.status === 401) {
- // We need to authenticate again
- // TODO: Should we just redirect to login page, show a message with a link, or something else
- this.alert = {
- type: Models.AlertType.danger,
- message: "Your session has timed out. Please log in and try again."
- };
- } else if (!response.status) {
- // Request timed out or no response from server or worse
- this._log.error("Error updating album " + this.album.AlbumId);
- this._log.error(response);
- this.alert = { type: Models.AlertType.danger, message: "An unexpected error occurred. Please try again." };
- this.disabled = false;
- }
- });
- }
-
- public deleteAlbum() {
- var deleteModal = this._modal.open({
- templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModal.cshtml",
- controller: "MusicStore.Admin.Catalog.AlbumDeleteModalController as viewModel",
- resolve: {
- album: () => this.album
- }
- });
-
- deleteModal.result.then(shouldDelete => {
- if (!shouldDelete) {
- return;
- }
-
- this._albumApi.deleteAlbum(this.album.AlbumId).then(result => {
- // Navigate back to the list
- this._viewAlert.alert = {
- type: Models.AlertType.success,
- message: result.data.Message
- };
- this._location.path("/albums").replace();
- });
- });
- }
-
- public clearAlert() {
- this.alert = null;
- }
- }
-
- angular.module("MusicStore.Admin.Catalog")
- .controller("MusicStore.Admin.Catalog.AlbumEditController", [
- "$routeParams",
- "MusicStore.AlbumApi.IAlbumApiService",
- "MusicStore.ArtistApi.IArtistApiService",
- "MusicStore.GenreApi.IGenreApiService",
- "MusicStore.ViewAlert.IViewAlertService",
- "$modal",
- "$location",
- "$timeout",
- "$q",
- "$log",
- AlbumEditController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumListController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumListController.ng.ts
deleted file mode 100644
index 11782f9c2e..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/Catalog/AlbumListController.ng.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-///
-
-module MusicStore.Admin.Catalog {
- interface IAlbumListViewModel {
- albums: Array;
- totalCount: number;
- currentPage: number;
- pageSize: number;
- loadPage(page?: number);
- deleteAlbum(album: Models.IAlbum);
- clearAlert();
- }
-
- class AlbumListController implements IAlbumListViewModel {
- private _albumApi: AlbumApi.IAlbumApiService;
- private _modal: ng.ui.bootstrap.IModalService;
- private _timeout: ng.ITimeoutService;
- private _log: ng.ILogService;
-
- constructor(albumApi: AlbumApi.IAlbumApiService,
- viewAlert: ViewAlert.IViewAlertService,
- $modal: ng.ui.bootstrap.IModalService,
- $timeout: ng.ITimeoutService,
- $log: ng.ILogService) {
-
- this._albumApi = albumApi;
- this._modal = $modal;
- this._timeout = $timeout;
- this._log = $log;
-
- this.currentPage = 1;
- this.pageSize = 50;
- this.loadPage(1);
- this.sortColumn = "Title";
-
- this.showAlert(viewAlert.alert, 3000);
- viewAlert.alert = null;
- }
-
- public alert: Models.IAlert;
-
- public albums: Array;
-
- public totalCount: number;
-
- public currentPage: number;
-
- public pageSize: number;
-
- public sortColumn: string;
-
- public sortDescending: boolean;
-
- public loadPage(page?: number) {
- page = page || this.currentPage;
- var sortByExpression = this.getSortByExpression();
- this._albumApi.getAlbums(page, this.pageSize, sortByExpression).then(result => {
- this.albums = result.Data;
- this.currentPage = result.Page;
- this.totalCount = result.TotalCount;
- });
- }
-
- public sortBy(column: string) {
- if (this.sortColumn === column) {
- // Just flip the direction
- this.sortDescending = !this.sortDescending;
- } else {
- this.sortColumn = column;
- this.sortDescending = false;
- }
-
- this.loadPage();
- }
-
- public deleteAlbum(album: Models.IAlbum) {
- var deleteModal = this._modal.open({
- templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumDeleteModal.cshtml",
- controller: "MusicStore.Admin.Catalog.AlbumDeleteModalController as viewModel",
- resolve: {
- album: () => album
- }
- });
-
- deleteModal.result.then(shouldDelete => {
- if (!shouldDelete) {
- return;
- }
-
- this._albumApi.deleteAlbum(album.AlbumId).then(result => {
- this.loadPage();
-
- this.showAlert({
- type: Models.AlertType.success,
- message: result.data.Message
- }, 3000);
- });
- });
- }
-
- public clearAlert() {
- this.alert = null;
- }
-
- private showAlert(alert: Models.IAlert, closeAfter?: number) {
- if (!alert) {
- return;
- }
-
- this.alert = alert;
-
- // TODO: Do we need to destroy this timeout on controller unload?
- if (closeAfter) {
- this._timeout(() => this.alert !== alert || this.clearAlert(), closeAfter);
- }
- }
-
- private getSortByExpression() {
- if (this.sortDescending) {
- return this.sortColumn + " DESC";
- }
- return this.sortColumn;
- }
- }
-
- angular.module("MusicStore.Admin.Catalog")
- .controller("MusicStore.Admin.Catalog.AlbumListController", [
- "MusicStore.AlbumApi.IAlbumApiService",
- "MusicStore.ViewAlert.IViewAlertService",
- "$modal",
- "$timeout",
- "$log",
- AlbumListController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/MusicStore.Admin.app.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/MusicStore.Admin.app.ng.ts
deleted file mode 100644
index c5fcd4fd91..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Admin/MusicStore.Admin.app.ng.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-///
-
-module MusicStore.Admin {
- angular.module("MusicStore.Admin", [
- "ngRoute",
- "ui.bootstrap",
- "MusicStore.InlineData",
- "MusicStore.GenreMenu",
- "MusicStore.UrlResolver",
- "MusicStore.UserDetails",
- "MusicStore.LoginLink",
- "MusicStore.Visited",
- "MusicStore.TitleCase",
- "MusicStore.Truncate",
- "MusicStore.GenreApi",
- "MusicStore.AlbumApi",
- "MusicStore.ArtistApi",
- "MusicStore.ViewAlert",
- "MusicStore.Admin.Catalog",
- ]).config([
- "$routeProvider",
- "$logProvider",
- configuration
- ]);
-
-
- var dependencies = [
- "ngRoute",
- "ui.bootstrap",
- MusicStore.InlineData,
- MusicStore.GenreMenu,
- MusicStore.UrlResolver,
- MusicStore.UserDetails,
- MusicStore.LoginLink,
- MusicStore.Visited,
- MusicStore.TitleCase,
- MusicStore.Truncate,
- MusicStore.GenreApi,
- MusicStore.AlbumApi,
- MusicStore.ArtistApi,
- MusicStore.ViewAlert,
- MusicStore.Admin.Catalog
- ];
-
- // Use this method to register work which needs to be performed on module loading.
- // Note only providers can be injected as dependencies here.
- function configuration($routeProvider: ng.route.IRouteProvider, $logProvider: ng.ILogProvider) {
- // TODO: Enable debug logging based on server config
- // TODO: Capture all logged errors and send back to server
- $logProvider.debugEnabled(true);
-
- // Configure routes
- $routeProvider
- .when("/albums/:albumId/details", { templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumDetails.cshtml" })
- .when("/albums/:albumId/:mode", { templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumEdit.cshtml" })
- .when("/albums/:mode", { templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumEdit.cshtml" })
- .when("/albums", { templateUrl: "ng-apps/MusicStore.Admin/Catalog/AlbumList.cshtml" })
- .otherwise({ redirectTo: "/albums" });
- }
-
- // Use this method to register work which should be performed when the injector is done loading all modules.
- //function BUG:run() {
-
- //}
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.AlbumApi.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.AlbumApi.ng.ts
deleted file mode 100644
index 1a800213a5..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.AlbumApi.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.AlbumApi {
- angular.module("MusicStore.AlbumApi", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ArtistApi.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ArtistApi.ng.ts
deleted file mode 100644
index a9244719dc..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ArtistApi.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.ArtistApi {
- angular.module("MusicStore.ArtistApi", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreApi.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreApi.ng.ts
deleted file mode 100644
index 26892bd0eb..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreApi.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.GenreApi {
- angular.module("MusicStore.GenreApi", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreMenu.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreMenu.ng.ts
deleted file mode 100644
index 22668b031b..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.GenreMenu.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.GenreMenu {
- angular.module("MusicStore.GenreMenu", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.InlineData.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.InlineData.ng.ts
deleted file mode 100644
index 36bb08aa4b..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.InlineData.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.InlineData {
- angular.module("MusicStore.InlineData", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.LoginLink.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.LoginLink.ng.ts
deleted file mode 100644
index 7e8531d163..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.LoginLink.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.LoginLink {
- angular.module("MusicStore.LoginLink", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.PreventSubmit.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.PreventSubmit.ng.ts
deleted file mode 100644
index d45d0a89c3..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.PreventSubmit.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.PreventSubmit {
- angular.module("MusicStore.PreventSubmit", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Catalog.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Catalog.ng.ts
deleted file mode 100644
index fe4813215c..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Catalog.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.Store.Catalog {
- angular.module("MusicStore.Store.Catalog", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Home.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Home.ng.ts
deleted file mode 100644
index 8df65c47a4..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store.Home.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.Store.Home {
- angular.module("MusicStore.Store.Home", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/AlbumDetailsController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/AlbumDetailsController.ng.ts
deleted file mode 100644
index 966e98ebbc..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/AlbumDetailsController.ng.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-
-module MusicStore.Store.Catalog {
- interface IAlbumDetailsViewModel {
- album: Models.IAlbum;
- }
-
- interface IAlbumDetailsRouteParams extends ng.route.IRouteParamsService {
- albumId: number;
- }
-
- class AlbumDetailsController implements IAlbumDetailsViewModel {
- public album: Models.IAlbum;
-
- constructor($routeParams: IAlbumDetailsRouteParams, albumApi: AlbumApi.IAlbumApiService) {
- var viewModel = this,
- albumId = $routeParams.albumId;
-
- albumApi.getAlbumDetails(albumId).then(album => {
- viewModel.album = album;
- });
- }
- }
-
- angular.module("MusicStore.Store.Catalog")
- .controller("MusicStore.Store.Catalog.AlbumDetailsController", [
- "$routeParams",
- "MusicStore.AlbumApi.IAlbumApiService",
- AlbumDetailsController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreDetailsController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreDetailsController.ng.ts
deleted file mode 100644
index 7ed563cee5..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreDetailsController.ng.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-///
-
-module MusicStore.Store.Catalog {
- interface IGenreDetailsViewModel {
- albums: Array;
- }
-
- interface IGenreDetailsRouteParams extends ng.route.IRouteParamsService {
- genreId: number;
- }
-
- class GenreDetailsController implements IGenreDetailsViewModel {
- public albums: Array;
-
- constructor($routeParams: IGenreDetailsRouteParams, genreApi: GenreApi.IGenreApiService) {
- var viewModel = this;
-
- genreApi.getGenreAlbums($routeParams.genreId).success(result => {
- viewModel.albums = result;
- });
- }
- }
-
- angular.module("MusicStore.Store.Catalog")
- .controller("MusicStore.Store.Catalog.GenreDetailsController", [
- "$routeParams",
- "MusicStore.GenreApi.IGenreApiService",
- GenreDetailsController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreListController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreListController.ng.ts
deleted file mode 100644
index 9429e353e3..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Catalog/GenreListController.ng.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-
-module MusicStore.Store.Catalog {
- interface IGenreListViewModel {
- genres: Array;
- }
-
- class GenreListController implements IGenreListViewModel {
- public genres: Array;
-
- constructor(genreApi: GenreApi.IGenreApiService) {
- var viewModel = this;
-
- genreApi.getGenresList().success(function (genres) {
- viewModel.genres = genres;
- });
- }
- }
-
- angular.module("MusicStore.Store.Catalog")
- .controller("MusicStore.Store.Catalog.GenreListController", [
- "MusicStore.GenreApi.IGenreApiService",
- GenreListController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Home/HomeController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Home/HomeController.ng.ts
deleted file mode 100644
index 81fb1f81c7..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/Home/HomeController.ng.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-///
-
-module MusicStore.Store.Home {
- interface IHomeViewModel {
- albums: Array
- }
-
- class HomeController implements IHomeViewModel {
- public albums: Array;
-
- constructor(albumApi: AlbumApi.IAlbumApiService) {
- var viewModel = this;
-
- albumApi.getMostPopularAlbums().then(albums => {
- viewModel.albums = albums;
- });
- }
- }
-
- angular.module("MusicStore.Store.Home")
- .controller("MusicStore.Store.Home.HomeController", [
- "MusicStore.AlbumApi.IAlbumApiService",
- HomeController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/MusicStore.Store.app.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/MusicStore.Store.app.ng.ts
deleted file mode 100644
index eb5f232456..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Store/MusicStore.Store.app.ng.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-///
-
-module MusicStore.Store {
- angular.module("MusicStore.Store", [
- "ngRoute",
- "MusicStore.InlineData",
- "MusicStore.PreventSubmit",
- "MusicStore.GenreMenu",
- "MusicStore.UrlResolver",
- "MusicStore.UserDetails",
- "MusicStore.LoginLink",
- "MusicStore.GenreApi",
- "MusicStore.AlbumApi",
- "MusicStore.Store.Home",
- "MusicStore.Store.Catalog",
- ]).config([
- "$routeProvider",
- "$logProvider",
- configuration
- ]).run([
- "$log",
- "MusicStore.UserDetails.IUserDetailsService",
- run
- ]);
-
-
- var dependencies = [
- "ngRoute",
- MusicStore.InlineData,
- MusicStore.PreventSubmit,
- MusicStore.GenreMenu,
- MusicStore.UrlResolver,
- MusicStore.UserDetails,
- MusicStore.LoginLink,
- MusicStore.GenreApi,
- MusicStore.AlbumApi,
- MusicStore.Store.Home,
- MusicStore.Store.Catalog
- ];
-
- // Use this method to register work which needs to be performed on module loading.
- // Note only providers can be injected as dependencies here.
- function configuration($routeProvider: ng.route.IRouteProvider, $logProvider: ng.ILogProvider) {
- // TODO: Enable debug logging based on server config
- // TODO: Capture all logged errors and send back to server
- $logProvider.debugEnabled(true);
-
- $routeProvider
- .when("/", { templateUrl: "ng-apps/MusicStore.Store/Home/Home.html" })
- .when("/albums/genres", { templateUrl: "ng-apps/MusicStore.Store/Catalog/GenreList.html" })
- .when("/albums/genres/:genreId", { templateUrl: "ng-apps/MusicStore.Store/Catalog/GenreDetails.html" })
- .when("/albums/:albumId", { templateUrl: "ng-apps/MusicStore.Store/Catalog/AlbumDetails.html" })
- .otherwise({ redirectTo: "/" });
- }
-
- // Use this method to register work which should be performed when the injector is done loading all modules.
- function run($log: ng.ILogService, userDetails: UserDetails.IUserDetailsService) {
- $log.log(userDetails.getUserDetails());
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.TitleCase.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.TitleCase.ng.ts
deleted file mode 100644
index 1ac0a57f1f..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.TitleCase.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.TitleCase {
- angular.module("MusicStore.TitleCase", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Truncate.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Truncate.ng.ts
deleted file mode 100644
index 93446dd698..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Truncate.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.Truncate {
- angular.module("MusicStore.Truncate", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UrlResolver.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UrlResolver.ng.ts
deleted file mode 100644
index b3388c5348..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UrlResolver.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.UrlResolver {
- angular.module("MusicStore.UrlResolver", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UserDetails.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UserDetails.ng.ts
deleted file mode 100644
index 84a96e6c73..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.UserDetails.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.UserDetails {
- angular.module("MusicStore.UserDetails", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ViewAlert.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ViewAlert.ng.ts
deleted file mode 100644
index c7f5ed3bda..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.ViewAlert.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.ViewAlert {
- angular.module("MusicStore.ViewAlert", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Visited.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Visited.ng.ts
deleted file mode 100644
index 6300a1e26f..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/MusicStore.Visited.ng.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-module MusicStore.Visited {
- angular.module("MusicStore.Visited", []);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/AlbumApi/AlbumApiService.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/AlbumApi/AlbumApiService.ng.ts
deleted file mode 100644
index 24d65aee67..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/AlbumApi/AlbumApiService.ng.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-///
-
-module MusicStore.AlbumApi {
- export interface IAlbumApiService {
- getAlbums(page?: number, pageSize?: number, sortBy?: string): ng.IPromise>;
- getAlbumDetails(albumId: number): ng.IPromise;
- getMostPopularAlbums(count?: number): ng.IPromise>;
- createAlbum(album: Models.IAlbum, config?: ng.IRequestConfig): ng.IHttpPromise;
- updateAlbum(album: Models.IAlbum, config?: ng.IRequestConfig): ng.IHttpPromise;
- deleteAlbum(albumId: number, config?: ng.IRequestConfig): ng.IHttpPromise;
- }
-
- class AlbumApiService implements IAlbumApiService {
- private _inlineData: ng.ICacheObject;
- private _q: ng.IQService;
- private _http: ng.IHttpService;
- private _urlResolver: UrlResolver.IUrlResolverService;
-
- constructor($cacheFactory: ng.ICacheFactoryService,
- $q: ng.IQService,
- $http: ng.IHttpService,
- urlResolver: UrlResolver.IUrlResolverService) {
- this._inlineData = $cacheFactory.get("inlineData");
- this._q = $q;
- this._http = $http;
- this._urlResolver = urlResolver;
- }
-
- public getAlbums(page?: number, pageSize?: number, sortBy?: string) {
- var url = this._urlResolver.resolveUrl("~/api/albums"),
- query: any = {},
- querySeparator = "?",
- inlineData;
-
- if (page) {
- query.page = page;
- }
-
- if (pageSize) {
- query.pageSize = pageSize;
- }
-
- if (sortBy) {
- query.sortBy = sortBy;
- }
-
- for (var key in query) {
- if (query.hasOwnProperty(key)) {
- url += querySeparator + key + "=" + encodeURIComponent(query[key]);
- if (querySeparator === "?") {
- querySeparator = "&";
- }
- }
- }
-
- inlineData = this._inlineData ? this._inlineData.get(url) : null;
-
- if (inlineData) {
- return this._q.when(inlineData);
- } else {
- return this._http.get(url).then(result => result.data);
- }
- }
-
- public getAlbumDetails(albumId: number) {
- var url = this._urlResolver.resolveUrl("~/api/albums/" + albumId);
- return this._http.get(url).then(result => result.data);
- }
-
- public getMostPopularAlbums(count?: number) {
- var url = this._urlResolver.resolveUrl("~/api/albums/mostPopular"),
- inlineData = this._inlineData ? this._inlineData.get(url) : null;
-
- if (inlineData) {
- return this._q.when(inlineData);
- } else {
- if (count && count > 0) {
- url += "?count=" + count;
- }
-
- return this._http.get(url).then(result => result.data);
- }
- }
-
- public createAlbum(album: Models.IAlbum, config?: ng.IRequestConfig) {
- var url = this._urlResolver.resolveUrl("api/albums");
- return this._http.post(url, album, config || { timeout: 10000 });
- }
-
- public updateAlbum(album: Models.IAlbum, config?: ng.IRequestConfig) {
- var url = this._urlResolver.resolveUrl("api/albums/" + album.AlbumId + "/update");
- return this._http.put(url, album, config || { timeout: 10000 });
- }
-
- public deleteAlbum(albumId: number, config?: ng.IRequestConfig) {
- var url = this._urlResolver.resolveUrl("api/albums/" + albumId);
- return this._http.delete(url, config || { timeout: 10000 });
- }
- }
-
- angular.module("MusicStore.AlbumApi")
- .service("MusicStore.AlbumApi.IAlbumApiService", [
- "$cacheFactory",
- "$q",
- "$http",
- "MusicStore.UrlResolver.IUrlResolverService",
- AlbumApiService
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/ArtistApi/ArtistApiService.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/ArtistApi/ArtistApiService.ng.ts
deleted file mode 100644
index e72e91c031..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/ArtistApi/ArtistApiService.ng.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-///
-
-module MusicStore.ArtistApi {
- export interface IArtistApiService {
- getArtistsLookup(): ng.IPromise>;
- }
-
- class ArtistsApiService implements IArtistApiService {
- private _inlineData: ng.ICacheObject;
- private _q: ng.IQService;
- private _http: ng.IHttpService;
- private _urlResolver: UrlResolver.IUrlResolverService;
-
- constructor($cacheFactory: ng.ICacheFactoryService,
- $q: ng.IQService,
- $http: ng.IHttpService,
- urlResolver: UrlResolver.IUrlResolverService) {
- this._inlineData = $cacheFactory.get("inlineData");
- this._q = $q;
- this._http = $http;
- this._urlResolver = urlResolver;
- }
-
- public getArtistsLookup() {
- var url = this._urlResolver.resolveUrl("~/api/artists/lookup"),
- inlineData = this._inlineData ? this._inlineData.get(url) : null;
-
- if (inlineData) {
- return this._q.when(inlineData);
- } else {
- return this._http.get(url).then(result => result.data);
- }
- }
- }
-
- angular.module("MusicStore.ArtistApi")
- .service("MusicStore.ArtistApi.IArtistApiService", [
- "$cacheFactory",
- "$q",
- "$http",
- "MusicStore.UrlResolver.IUrlResolverService",
- ArtistsApiService
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreApi/GenreApiService.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreApi/GenreApiService.ng.ts
deleted file mode 100644
index 67b99789ba..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreApi/GenreApiService.ng.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-///
-
-module MusicStore.GenreApi {
- export interface IGenreApiService {
- getGenresLookup(): ng.IPromise>;
- getGenresMenu(): ng.IPromise>;
- getGenresList(): ng.IHttpPromise>;
- getGenreAlbums(genreId: number): ng.IHttpPromise>;
- }
-
- class GenreApiService implements IGenreApiService {
- private _inlineData: ng.ICacheObject;
- private _q: ng.IQService;
- private _http: ng.IHttpService;
- private _urlResolver: UrlResolver.IUrlResolverService;
-
- constructor($cacheFactory: ng.ICacheFactoryService,
- $q: ng.IQService,
- $http: ng.IHttpService,
- urlResolver: UrlResolver.IUrlResolverService) {
- this._inlineData = $cacheFactory.get("inlineData");
- this._q = $q;
- this._http = $http;
- this._urlResolver = urlResolver;
- }
-
- public getGenresLookup() {
- var url = this._urlResolver.resolveUrl("~/api/genres/lookup"),
- inlineData = this._inlineData ? this._inlineData.get(url) : null;
-
- if (inlineData) {
- return this._q.when(inlineData);
- } else {
- return this._http.get(url).then(result => result.data);
- }
- }
-
- public getGenresMenu() {
- var url = this._urlResolver.resolveUrl("~/api/genres/menu"),
- inlineData = this._inlineData ? this._inlineData.get(url) : null;
-
- if (inlineData) {
- return this._q.when(inlineData);
- } else {
- return this._http.get(url).then(result => result.data);
- }
- }
-
- public getGenresList() {
- var url = this._urlResolver.resolveUrl("~/api/genres");
- return this._http.get(url);
- }
-
- public getGenreAlbums(genreId: number) {
- var url = this._urlResolver.resolveUrl("~/api/genres/" + genreId + "/albums");
- return this._http.get(url);
- }
- }
-
- angular.module("MusicStore.GenreApi")
- .service("MusicStore.GenreApi.IGenreApiService", [
- "$cacheFactory",
- "$q",
- "$http",
- "MusicStore.UrlResolver.IUrlResolverService",
- GenreApiService
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuController.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuController.ng.ts
deleted file mode 100644
index 872e009a3e..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuController.ng.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-///
-
-module MusicStore.GenreMenu {
- interface IGenreMenuViewModel {
- genres: Array;
- urlBase: string;
- }
-
- class GenreMenuController implements IGenreMenuViewModel {
- constructor(genreApi: GenreApi.IGenreApiService, urlResolver: UrlResolver.IUrlResolverService) {
- var viewModel = this;
-
- genreApi.getGenresMenu().then(genres => {
- viewModel.genres = genres;
- });
-
- viewModel.urlBase = urlResolver.base;
- }
-
- public genres: Array;
-
- public urlBase: string;
- }
-
- angular.module("MusicStore.GenreMenu")
- .controller("MusicStore.GenreMenu.GenreMenuController", [
- "MusicStore.GenreApi.IGenreApiService",
- "MusicStore.UrlResolver.IUrlResolverService",
- GenreMenuController
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuDirective.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuDirective.ng.ts
deleted file mode 100644
index 516abdb7dd..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/GenreMenu/GenreMenuDirective.ng.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-///
-
-module MusicStore.GenreMenu {
-
- //@NgDirective('appGenreMenu')
- class GenreMenuDirective implements ng.IDirective {
- public replace = true;
- public restrict = "A";
- public templateUrl;
-
- constructor(urlResolver: UrlResolver.IUrlResolverService) {
- for (var m in this) {
- if (this[m].bind) {
- this[m] = this[m].bind(this);
- }
- }
- this.templateUrl = urlResolver.resolveUrl("~/ng-apps/components/GenreMenu/GenreMenu.html");
- }
- }
-
- angular.module("MusicStore.GenreMenu")
- .directive("appGenreMenu", [
- "MusicStore.UrlResolver.IUrlResolverService",
- function (a) {
- return new GenreMenuDirective(a);
- }
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/InlineData/InlineDataDirective.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/InlineData/InlineDataDirective.ng.ts
deleted file mode 100644
index 419118a231..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/InlineData/InlineDataDirective.ng.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-///
-
-module MusicStore.InlineData {
- interface InlineDataAttributes extends ng.IAttributes {
- type: string;
- for: string;
- }
-
- //@NgDirective('appInlineData')
- class InlineDataDirective implements ng.IDirective {
- private _cache: ng.ICacheObject;
- private _log: ng.ILogService;
-
- constructor($cacheFactory: ng.ICacheFactoryService, $log: ng.ILogService) {
- for (var m in this) {
- if (this[m].bind) {
- this[m] = this[m].bind(this);
- }
- }
- this._cache = $cacheFactory.get("inlineData") || $cacheFactory("inlineData");
- this._log = $log;
- }
-
- public restrict = "A";
-
- public link(scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: InlineDataAttributes) {
- var data = attrs.type === "application/json"
- ? angular.fromJson(element.text())
- : element.text();
-
- this._log.info("appInlineData: Inline data element found for " + attrs.for);
-
- this._cache.put(attrs.for, data);
-
- //element.remove();
- }
- }
-
- angular.module("MusicStore.InlineData")
- .directive("appInlineData", [
- "$cacheFactory",
- "$log",
- function (a,b) {
- return new InlineDataDirective(a,b);
- }
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/LoginLink/LoginLinkDirective.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/LoginLink/LoginLinkDirective.ng.ts
deleted file mode 100644
index cbe2edc2bb..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/LoginLink/LoginLinkDirective.ng.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-///
-
-module MusicStore.LoginLink {
- interface LoginLinkAttributes extends ng.IAttributes {
- href: string;
- }
-
- //@NgDirective('appLoginLink')
- class LoginLinkDirective implements ng.IDirective {
- private _window: ng.IWindowService;
-
- constructor(urlResolver: UrlResolver.IUrlResolverService, $window: ng.IWindowService) {
- for (var m in this) {
- if (this[m].bind) {
- this[m] = this[m].bind(this);
- }
- }
- this._window = $window;
- }
-
- public restrict = "A";
-
- public link(scope: ng.IScope, element: ng.IAugmentedJQuery, attrs: LoginLinkAttributes) {
- if (!element.is("a[href]")) {
- return;
- }
-
- // Grab the original login URL
- var loginUrl = attrs.href;
-
- element.click(event => {
- // Update the returnUrl querystring value to current path
- var currentUrl = this._window.location.pathname + this._window.location.search + this._window.location.hash,
- newUrl = loginUrl + "?returnUrl=" + encodeURIComponent(currentUrl);
-
- element.prop("href", newUrl);
- });
- }
- }
-
- angular.module("MusicStore.LoginLink")
- .directive("appLoginLink", [
- "MusicStore.UrlResolver.IUrlResolverService",
- "$window",
- function (a,b) {
- return new LoginLinkDirective(a,b);
- }
- ]);
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlbum.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlbum.ng.ts
deleted file mode 100644
index fd8bce8f62..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlbum.ng.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-module MusicStore.Models {
- export interface IAlbum {
- AlbumId: number;
- GenreId: number;
- ArtistId: number;
-
- Title: string;
- AlbumArtUrl: string;
- Price: number;
-
- Artist: IArtist;
- Genre: IGenre;
-
- DetailsUrl: string;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlert.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlert.ng.ts
deleted file mode 100644
index 5184e73fdf..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IAlert.ng.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-module MusicStore.Models {
- export interface IAlert {
- type: AlertType;
- message: string;
- }
-
- export interface IModelErrorAlert extends IAlert {
- modelErrors: Array;
- }
-
- export class AlertType {
- constructor(public value: string) {
- }
-
- public toString() {
- return this.value;
- }
-
- // Values
- static success = new AlertType("success");
- static info = new AlertType("info");
- static warning = new AlertType("warning");
- static danger = new AlertType("danger");
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IApiResult.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IApiResult.ng.ts
deleted file mode 100644
index 6ccc2fd98e..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IApiResult.ng.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-module MusicStore.Models {
- export interface IApiResult {
- Message?: string;
- Data?: any;
- ModelErrors?: Array;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IArtist.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IArtist.ng.ts
deleted file mode 100644
index 9d40978f30..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IArtist.ng.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-module MusicStore.Models {
- export interface IArtist {
- ArtistId: number;
- Name: string;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenre.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenre.ng.ts
deleted file mode 100644
index 6b60385fc7..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenre.ng.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-module MusicStore.Models {
- export interface IGenre {
- GenreId: number;
- Name: string;
- Description: string;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenreLookup.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenreLookup.ng.ts
deleted file mode 100644
index 1cc50c8e30..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IGenreLookup.ng.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-module MusicStore.Models {
- export interface IGenreLookup {
- GenreId: number;
- Name: string;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IModelError.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IModelError.ng.ts
deleted file mode 100644
index 8d062d945d..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IModelError.ng.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-module MusicStore.Models {
- export interface IModelError {
- FieldName: string;
- ErrorMessage: string;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IPagedList.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IPagedList.ng.ts
deleted file mode 100644
index 56b7efa324..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IPagedList.ng.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-module MusicStore.Models {
- export interface IPagedList {
- Data: Array;
- Page: number;
- PageSize: number;
- TotalCount: number;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IUserDetails.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IUserDetails.ng.ts
deleted file mode 100644
index ddac9992f4..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/Models/IUserDetails.ng.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-module MusicStore.Models {
- export interface IUserDetails {
- isAuthenticated: boolean;
- userName: string;
- userId: string;
- roles: Array;
- }
-}
\ No newline at end of file
diff --git a/src/MvcMusicStore.Spa/Client/ng-apps/components/PreventSubmit/PreventSubmitDirective.ng.ts b/src/MvcMusicStore.Spa/Client/ng-apps/components/PreventSubmit/PreventSubmitDirective.ng.ts
deleted file mode 100644
index b330c2d11d..0000000000
--- a/src/MvcMusicStore.Spa/Client/ng-apps/components/PreventSubmit/PreventSubmitDirective.ng.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-///
-
-module MusicStore.PreventSubmit {
- interface IPreventSubmitAttributes extends ng.IAttributes {
- name: string;
- appPreventSubmit: string;
- }
-
- //@NgDirective('appPreventSubmit')
- class PreventSubmitDirective implements ng.IDirective {
- constructor() {
- for (var m in this) {
- if (this[m].bind) {
- this[m] = this[m].bind(this);
- }
- }
- }
-
- private _preventSubmit: any;
-
- public restrict = "A";
-
- public link(scope: any, element: ng.IAugmentedJQuery, attrs: IPreventSubmitAttributes) {
- // TODO: Just make this directive apply to all