Fórum
Liferay 7 reloads the Angular JS 2 component on click of anchor tag
JB Shaik, modificado 7 Anos atrás.
Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Junior Member Postagens: 35 Data de Entrada: 22/03/17 Postagens Recentes
Hi,
I'm trying to build a portlet in Liferay using Angular JS 2.
I have two tabs built in Angular JS 2 to display two tables of data. Whenever I hit on second tab, Liferay is reloading the whole page again. But my code was working fine on Node Js.
Above is how the tabs are rendered on the browser. The moment I click on tab 2, it shows Tab2 and immediately the page is reloaded and tab is being selected.
Please assist
I'm trying to build a portlet in Liferay using Angular JS 2.
I have two tabs built in Angular JS 2 to display two tables of data. Whenever I hit on second tab, Liferay is reloading the whole page again. But my code was working fine on Node Js.
<ul class="nav nav-tabs">
<li class="active">
<a ng-reflect-href="#" href="#">TAB 1</a>
</li><li>
<a ng-reflect-href="#" href="#">TAB 2</a>
</li>
</ul>
Above is how the tabs are rendered on the browser. The moment I click on tab 2, it shows Tab2 and immediately the page is reloaded and tab is being selected.
Please assist
David H Nebinger, modificado 7 Anos atrás.
RE: Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
When you are running in Liferay you have to understand there's a whole lot of JS and CSS that comes along with it.
You see a naked <a /> tag and think that you're in control of it. Liferay, however, has already assigned javascript to many things on the page.
You see a naked <a /> tag and think that you're in control of it. Liferay, however, has already assigned javascript to many things on the page.
JB Shaik, modificado 7 Anos atrás.
RE: Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Junior Member Postagens: 35 Data de Entrada: 22/03/17 Postagens Recentes
Thanks David. This was issue with Angular Js itself and not with Liferay. I managed to get a work around for this issue.
Thanks for your assistance on this.
Thanks for your assistance on this.