diff --git a/src/app/article/content-viewer/content-viewer-actions.component.spec.ts b/src/app/article/content-viewer/content-viewer-actions.component.spec.ts index 71ca1de..23fbae6 100644 --- a/src/app/article/content-viewer/content-viewer-actions.component.spec.ts +++ b/src/app/article/content-viewer/content-viewer-actions.component.spec.ts @@ -5,7 +5,7 @@ import {Input, Component, provide} from 'ng-forward'; import * as helpers from "../../../spec/helpers"; import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder'; -import {ContentViewerActions} from './content-viewer-actions.component'; +import {ContentViewerActionsComponent} from './content-viewer-actions.component'; // this htmlTemplate will be re-used between the container components in this spec file const htmlTemplate: string = ''; @@ -31,7 +31,7 @@ describe('Content Viewer Actions Component', () => { helpers.provideEmptyObjects('Restangular'), helpers.provideFilters('translateFilter') ], - directives: [ContentViewerActions], + directives: [ContentViewerActionsComponent], template: htmlTemplate }); }; @@ -56,7 +56,7 @@ describe('Content Viewer Actions Component', () => { }; buildComponent().then((fixture: ComponentFixture) => { - let contentViewerComp: ContentViewerActions = fixture.debugElement.componentViewChildren[0].componentInstance; + let contentViewerComp: ContentViewerActionsComponent = fixture.debugElement.componentViewChildren[0].componentInstance; expect(contentViewerComp.profile).toEqual(jasmine.objectContaining(profile)); diff --git a/src/app/article/content-viewer/content-viewer-actions.component.ts b/src/app/article/content-viewer/content-viewer-actions.component.ts index be0d629..6d3735e 100644 --- a/src/app/article/content-viewer/content-viewer-actions.component.ts +++ b/src/app/article/content-viewer/content-viewer-actions.component.ts @@ -7,7 +7,7 @@ import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service" providers: [provide('profileService', { useClass: ProfileService })] }) @Inject(ProfileService) -export class ContentViewerActions { +export class ContentViewerActionsComponent { article: noosfero.Article; profile: noosfero.Profile; diff --git a/src/app/index.ts b/src/app/index.ts index 1b00440..10a9c24 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -2,7 +2,7 @@ import {NoosferoApp} from "./index.module"; import {noosferoModuleConfig} from "./index.config"; import {noosferoAngularRunBlock} from "./index.run"; -import {Main} from "./main/main.component"; +import {MainComponent} from "./main/main.component"; import {bootstrap, bundle} from "ng-forward"; import {AUTH_EVENTS} from "./login/auth-events"; @@ -12,7 +12,7 @@ import {Navbar} from "./layout/navbar/navbar"; declare var moment: any; -let noosferoApp: any = bundle("noosferoApp", Main, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", +let noosferoApp: any = bundle("noosferoApp", MainComponent, ["ngAnimate", "ngCookies", "ngStorage", "ngTouch", "ngSanitize", "ngMessages", "ngAria", "restangular", "ui.router", "ui.bootstrap", "toastr", "angularMoment", "angular.filter", "akoenig.deckgrid", diff --git a/src/app/layout/language-selector/language-selector.component.spec.ts b/src/app/layout/language-selector/language-selector.component.spec.ts index b20e9e3..8a55b83 100644 --- a/src/app/layout/language-selector/language-selector.component.spec.ts +++ b/src/app/layout/language-selector/language-selector.component.spec.ts @@ -1,7 +1,7 @@ import {ComponentFixture} from 'ng-forward/cjs/testing/test-component-builder'; import {provide} from 'ng-forward'; -import {LanguageSelectorService} from './language-selector.component'; +import {LanguageSelectorComponent} from './language-selector.component'; import * as helpers from "../../../spec/helpers"; @@ -17,7 +17,7 @@ describe("Components", () => { translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]); return helpers.quickCreateComponent({ template: "", - directives: [LanguageSelectorService], + directives: [LanguageSelectorComponent], providers: [ provide('TranslatorService', { useValue: translatorService @@ -36,7 +36,7 @@ describe("Components", () => { it("call the translator service when change the language", (done) => { let translatorService = jasmine.createSpyObj("translatorService", ["changeLanguage"]); - let languageSelector = new LanguageSelectorService(translatorService); + let languageSelector = new LanguageSelectorComponent(translatorService); languageSelector.changeLanguage("en"); expect(translatorService.changeLanguage).toHaveBeenCalledWith("en"); done(); diff --git a/src/app/layout/language-selector/language-selector.component.ts b/src/app/layout/language-selector/language-selector.component.ts index 41bc805..dcfb843 100644 --- a/src/app/layout/language-selector/language-selector.component.ts +++ b/src/app/layout/language-selector/language-selector.component.ts @@ -6,7 +6,7 @@ import {TranslatorService} from "../../shared/services/translator.service"; templateUrl: "app/layout/language-selector/language-selector.html" }) @Inject(TranslatorService) -export class LanguageSelectorService { +export class LanguageSelectorComponent { constructor(private translatorService: TranslatorService) { } diff --git a/src/app/layout/navbar/navbar.ts b/src/app/layout/navbar/navbar.ts index f1db8b3..cb34349 100644 --- a/src/app/layout/navbar/navbar.ts +++ b/src/app/layout/navbar/navbar.ts @@ -1,5 +1,5 @@ import {Component, Inject} from "ng-forward"; -import {LanguageSelectorService} from "../language-selector/language-selector.component"; +import {LanguageSelectorComponent} from "../language-selector/language-selector.component"; import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} from "./../../login"; @@ -7,7 +7,7 @@ import {SessionService, AuthService, AuthController, IAuthEvents, AUTH_EVENTS} f @Component({ selector: "acme-navbar", templateUrl: "app/layout/navbar/navbar.html", - directives: [LanguageSelectorService], + directives: [LanguageSelectorComponent], providers: [AuthService, SessionService] }) @Inject("$modal", AuthService, "SessionService", "$scope", "$state") diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index b1e802e..837c567 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -28,7 +28,7 @@ import {MainBlockComponent} from "../layout/blocks/main-block/main-block.compone /** * @ngdoc controller - * @name main.MainContent + * @name main.MainContentComponent * @requires AuthService, Session * @descrition * This controller actually contains the main content of Noosfero Angular Theme: @@ -41,7 +41,7 @@ import {MainBlockComponent} from "../layout/blocks/main-block/main-block.compone templateUrl: "app/main/main.html", providers: [AuthService, SessionService] }) -export class MainContent { +export class MainContentComponent { } @@ -55,7 +55,7 @@ export class MainContent { * The Main controller for the Noosfero Angular Theme application. * * The main route '/' is defined as the URL for this controller, which routes - * requests to the {@link main.MainContent} controller and also, the '/profile' route, + * requests to the {@link main.MainContentComponent} controller and also, the '/profile' route, * which routes requests to the {@link profile.Profile} controller. See {@link profile.Profile} * for more details on how various Noosfero profiles are rendered. */ @@ -72,7 +72,7 @@ export class MainContent { @StateConfig([ { url: '/', - component: MainContent, + component: MainContentComponent, name: 'main', }, { @@ -89,6 +89,6 @@ export class MainContent { } } ]) -export class Main { +export class MainComponent { } diff --git a/src/app/profile/myprofile.component.ts b/src/app/profile/myprofile.component.ts index 32686b9..486e96e 100644 --- a/src/app/profile/myprofile.component.ts +++ b/src/app/profile/myprofile.component.ts @@ -4,6 +4,6 @@ import {Component} from "ng-forward"; selector: 'profile', templateUrl: "app/profile/profile.html", }) -export class MyProfile { +export class MyProfileComponent { } diff --git a/src/app/profile/profile-home.component.ts b/src/app/profile/profile-home.component.ts index 5666f9e..0874260 100644 --- a/src/app/profile/profile-home.component.ts +++ b/src/app/profile/profile-home.component.ts @@ -8,7 +8,7 @@ import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service"; providers: [provide('profileService', { useClass: ProfileService })] }) @Inject(ProfileService, "$state") -export class ProfileHome { +export class ProfileHomeComponent { profile: noosfero.Profile; diff --git a/src/app/profile/profile.component.ts b/src/app/profile/profile.component.ts index 2f7ca7c..dd635bf 100644 --- a/src/app/profile/profile.component.ts +++ b/src/app/profile/profile.component.ts @@ -1,13 +1,13 @@ import {StateConfig, Component, Inject, provide} from 'ng-forward'; import {ProfileInfoComponent} from './info/profile-info.component'; -import {ProfileHome} from './profile-home.component'; +import {ProfileHomeComponent} from './profile-home.component'; import {BasicEditorComponent} from '../article/basic-editor.component'; import {ContentViewerComponent} from "../article/content-viewer/content-viewer.component"; -import {ContentViewerActions} from "../article/content-viewer/content-viewer-actions.component"; +import {ContentViewerActionsComponent} from "../article/content-viewer/content-viewer-actions.component"; import {ActivitiesComponent} from "./activities/activities.component"; import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service"; import {NotificationService} from "../shared/services/notification.service"; -import {MyProfile} from "./myprofile.component"; +import {MyProfileComponent} from "./myprofile.component"; /** @@ -42,7 +42,7 @@ import {MyProfile} from "./myprofile.component"; { name: 'main.profile.settings', url: "^/myprofile/:profile", - component: MyProfile + component: MyProfileComponent }, { name: 'main.profile.cms', @@ -59,10 +59,10 @@ import {MyProfile} from "./myprofile.component"; { name: 'main.profile.home', url: "", - component: ProfileHome, + component: ProfileHomeComponent, views: { "mainBlockContent": { - controller: ProfileHome, + controller: ProfileHomeComponent, controllerAs: "vm" } } @@ -79,7 +79,7 @@ import {MyProfile} from "./myprofile.component"; }, "actions@main": { templateUrl: "app/article/content-viewer/navbar-actions.html", - controller: ContentViewerActions, + controller: ContentViewerActionsComponent, controllerAs: "vm" } } -- libgit2 0.21.2