diff --git a/src/app/components/noosfero-blocks/block.component.ts b/src/app/components/noosfero-blocks/block.component.ts index 88ae339..f1793a5 100644 --- a/src/app/components/noosfero-blocks/block.component.ts +++ b/src/app/components/noosfero-blocks/block.component.ts @@ -12,7 +12,7 @@ export class Block { ngOnInit() { let blockName = this.block.type ? this.block.type.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() : "default-block"; - this.$element.replaceWith(this.$compile('')(this.$scope)); + this.$element.replaceWith(this.$compile('')(this.$scope)); } constructor(private $element: any, private $scope: ng.IScope, private $injector: ng.auto.IInjectorService, private $compile: ng.ICompileService) { diff --git a/src/app/components/noosfero-blocks/link-list/link-list.component.js b/src/app/components/noosfero-blocks/link-list/link-list.component.js deleted file mode 100644 index fb5ce37..0000000 --- a/src/app/components/noosfero-blocks/link-list/link-list.component.js +++ /dev/null @@ -1,21 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('noosferoApp') - .component('noosferoLinkListBlock', { - restrict: 'E', - templateUrl: 'app/components/noosfero-blocks/link-list/link-list.html', - bindings: { - block: '<', - owner: '<' - }, - controller: LinkListBlockController - }); - - /** @ngInject */ - function LinkListBlockController() { - this.links = this.block.settings.links; - } - -})(); diff --git a/src/app/components/noosfero-blocks/link-list/link-list.component.ts b/src/app/components/noosfero-blocks/link-list/link-list.component.ts new file mode 100644 index 0000000..58ba6b6 --- /dev/null +++ b/src/app/components/noosfero-blocks/link-list/link-list.component.ts @@ -0,0 +1,18 @@ +import {Component, Input} from "ng-forward"; + +@Component({ + selector: "noosfero-link-list-block", + templateUrl: "app/components/noosfero-blocks/link-list/link-list.html" +}) +export class LinkListBlock { + + @Input() block: any; + @Input() owner: any; + + links: any; + + ngOnInit() { + this.links = this.block.settings.links; + } + +} diff --git a/src/app/components/noosfero-blocks/link-list/link-list.html b/src/app/components/noosfero-blocks/link-list/link-list.html index 7915222..f874ad4 100644 --- a/src/app/components/noosfero-blocks/link-list/link-list.html +++ b/src/app/components/noosfero-blocks/link-list/link-list.html @@ -1,6 +1,6 @@