M
M
Mikhailo Poberezhny2016-05-04 21:29:19
Angular
Mikhailo Poberezhny, 2016-05-04 21:29:19

How to get the html of a page?

Guys I have on the Angular front. When I want to get the HTML of the page, it gives me the following:

<html ng-app="starter">
<head ng-controller="metaCtrl">
    <title>Lexterr | Лекстерр — територія закону. Юридичні послуги онлайн, публікації юристів, висновки Верховного суду України, консультації — lexterr.com.ua</title>
    <meta name="google-site-verification"  content="YnXkBy4p-fd-BeDkPzIeFPO1UXZENcyY_lUm1MJ5og4" />
    <meta http-equiv="Content-Type"        content="text/html; charset=utf-8" />
    <meta name="viewport"                  content="width=device-width, initial-scale=1">
    <meta name="keywords"                  content="{{metaData.keywords}}">
    <meta name="description"               content="{{metaData.description}}">

    <meta property="og:type"               content="article" />
    <meta property="og:title"              content="{{metaData.title}}" />
    <meta property="og:description"        content="{{metaData.description}}" />

    <meta name="fragment" content="!" />
    <base href="/" />
    <!-- Libs -->
    <!-- IF you have 404 error on this libs, please, install bower-installer via npm, and run bower-install in your terminal -->
    <script src="socket.io/socket.io.js"></script>
    <link href="css/style.css" rel="stylesheet">
    <link href="css/social.css" rel="stylesheet">
    <link href="libs/angular-toastr/angular-toastr.css" rel="stylesheet">
    <link href="libs/bootstrap-css-only/bootstrap.css" rel="stylesheet">
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="libs/angular/angular.js"></script>
    <script src="libs/angular-animate/angular-animate.js"></script>
    <script src="libs/angular-bootstrap/ui-bootstrap-tpls.js"></script>
    <script src="libs/angular-cookies/angular-cookies.js"></script>
    <script src="libs/angular-ui-router/angular-ui-router.js"></script>
    <script src="libs/angular-toastr/angular-toastr.tpls.js"></script>
    <script src="libs/checklist-model/checklist-model.js"></script>
    <script src="libs/angular-elastic/elastic.js"></script>
    <script src="libs/angular-socialshare/angular-socialshare.min.js"></script>
    <script src="libs/angular-socket-io/socket.js"></script>
    <script src="libs/angular-scroll-glue/scrollglue.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

    <!-- //Libs -->
    <!--Font-->
    <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700&subset=latin,cyrillic,cyrillic-ext' rel='stylesheet' type='text/css'>
    <!--Font-->
    <!-- Custom scripts   -->
    <script src="js/app.js"></script>
    <script src="modules/threads/threads_module.js"></script>
    <script src="modules/notification/notification_module.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/multipartForm.js"></script>
    <!-- /Custom scripts -->
    <!--  Services -->
    <script src="modules/authorization/authorization_service.js"></script>
    <script src="modules/person/person_service.js"></script>
    <script src="modules/category/category_service.js"></script>
    <script src="modules/order/order_service.js"></script>
    <script src="modules/posts/posts_service.js"></script>
    <script src="js/meta_service.js"></script>
    <!-- / Services -->
    <!-- controllers -->
    <script src="modules/person/person_controllers.js"></script>
    <script src="modules/category/category_controllers.js"></script>
    <!-- /controllers -->
    <!-- directives -->
    <script src="js/fileUpload_directive.js"></script>
    <!-- /    directives -->
    <script src="https://www.google.com/recaptcha/api.js?onload=vcRecaptchaApiLoaded&render=explicit" async defer></script>
    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
100  5524  100  5524    0     0   337k      0 --:--:-- --:--:-- --:--:--  337ki[r].l=1*new Date();a=s.createElement(o),
                m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-74435115-1', 'auto');
        ga('send', 'pageview');

    </script>
</head>

<script>
    $(document).on('change', '.btn-file :file', function() {
        var input = $(this),
                numFiles = input.get(0).files ? input.get(0).files.length : 1,
                label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
        input.trigger('fileselect', [numFiles, label]);
    });

    $(document).ready( function() {
        $('.btn-file :file').on('fileselect', function(event, numFiles, label) {
            var input = $(this).parents('.input-group').find(':text'),
                    log = numFiles > 1 ? numFiles + ' files selected' : label;
            if( input.length ) {
                input.val(log);
            } else {
                if( log ) alert(log);
            }
        });
    });
</script>

<body ng-controller="MainCtrl" class="subBackground">

<header>
    <div ng-include="'/modules/authorization/header_view.html'"></div>
</header>
<div class="container containerMarginWrapper" ui-view="content" autoscroll="true">
</div>
<!--<footer ui-view="footer">-->
<!--</footer>-->
</body>

</html>

how can I get the page after processing by Angular, the page with the data, and not this script.
I tried "prerender-node" but I get some kind of JSON instead of HTML. Help ^^.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yury Egorenkov, 2016-11-12
@yury_egorenkov

Try renderjs.io

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question