angularjs - Rendering form from a POST request to Drupal 8 -


i´m working on spa project uses drupal 8 backend , angularjs frontend. i´m trying login/register/any other form validation on server side, , client side requests forms post (using rest ui). problem i´m having when post request form comes rendered comes attached html, renders navigation bar , other elements have on page.

like this: enter image description here

any way render form without rest of page?

app.filter('unsafe', function ($sce) {     return $sce.trustashtml; });  app.controller('loginctrl', [     '$scope',     '$routeparams',     '$http',     '$sce',  function ($scope, $routeparams, $http, $sce) {             console.log('loginctrl');             $http.get('/test/myform')                     .then(function (result) {                         $scope.renderhtml = function (htmlcode) {                             return $sce.trustashtml(htmlcode);                         };                         $scope.content = (function () {                             console.log(result);                             return result.data;                         })();                     }); 

the other alternative rendering forms client side , sending info backend, problem comes forms aren't static, means number of fields vary according user logged in, , can't current user status on angularjs.

greatly appreciated help.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -