Saturday, October 22, 2016

When developing Single page app in aem, You would have to include partials inside the master page and at the same time you would want that to be author-able  on its own. So You can use the concept of partials as follows:

Create a main page component which would be serving as a master page and for angular partial includes , You can create another content page component and keep 2  html or jsp pages one with same name and other as partial.html. In the contentpage.html keep all the libraries as per the main master page. But in case of partial.html, you can only keep only one parasys component.



<div class="page__par" data-sly-resource="par"></div>

no other other libabry include will be there as in contentpage.html.

So in the angularjs code you can use that partial.html as follows:

.when('/routename', {
templateUrl: function (urlattr) {
return '/content/projectname/locale/siteadminpagename.partial.html';
}
})


Related Posts:

  • angularjs custom trigger $rootScope:inprog error At any point in time there can be only one $digest or $apply operation in progress So when you try to trigger a event, there is possibility that $digest or $apply is already in progress. There is a… Read More
  • AEM (CQ5) - partials for AngularJS When developing Single page app in aem, You would have to include partials inside the master page and at the same time you would want that to be author-able  on its own. So You can use the concept of partials as follows… Read More

0 comments:

Post a Comment

Powered by Blogger.

Followers

Best Price Amazon Portal

Amazon Best Offers