How to use the angular2-universal.parseFragment function in angular2-universal

To help you get started, we’ve selected a few angular2-universal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github barbatus / angular2-meteor-universal / build / bootloader.js View on Github external
.then(function (code) {
                var el = config.compRef.location.nativeElement;
                var script = angular2_universal_1.parseFragment(code);
                var prebootEl = DOM.createElement('div');
                DOM.setInnerHTML(prebootEl, code);
                DOM.insertAfter(el, prebootEl);
                var logger = config.appRef.injector.get(logger_1.Logger);
                logger.debug('preboot source code rendered');
                return config;
            });
        })
github barbatus / angular2-meteor-universal / modules / bootloader.ts View on Github external
.then(code => {
          let el = config.compRef.location.nativeElement;
          let script = parseFragment(code);
          let prebootEl = DOM.createElement('div');
          DOM.setInnerHTML(prebootEl, code);
          DOM.insertAfter(el, prebootEl);
          let logger = config.appRef.injector.get(Logger);
          logger.debug('preboot source code rendered');
          return config;
        });
    })