掲示板
Liferay 7 reloads the Angular JS 2 component on click of anchor tag
7年前 に JB Shaik によって更新されました。
Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Junior Member 投稿: 35 参加年月日: 17/03/22 最新の投稿
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
7年前 に David H Nebinger によって更新されました。
RE: Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
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.
7年前 に JB Shaik によって更新されました。
RE: Liferay 7 reloads the Angular JS 2 component on click of anchor tag
Junior Member 投稿: 35 参加年月日: 17/03/22 最新の投稿
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.