Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-universal-preview

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-universal-preview

Universal (isomorphic) javascript support for Angular2

  • 0.22.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

Angular 2 Universal

Angular 2 Universal

Universal (isomorphic) JavaScript support for Angular 2

Table of Contents

  • Modules
  • Best Practices
  • What's in a name?
  • License

Modules

Universal

Manage your application lifecycle and serialize changes while on the server to be sent to the client

Documentation

Design Doc

Videos

Full Stack Angular 2 - AngularConnect, Oct 2015
Full Stack Angular 2

Angular 2 Server Rendering - Angular U, July 2015
Angular 2 Server Rendering

preboot.js

Control server-rendered page and transfer state before client-side web app loads to the client-side-app.

Best Practices

When building Universal components in Angular 2 there are a few things to keep in mind

  • Know the difference between attributes and properties in relation to the DOM
  • Don't manipulate the nativeElement directly. Use the Renderer
constructor(element: ElementRef, renderer: Renderer) {
  renderer.setElementStyle(element, 'fontSize', 'x-large');
}
  • Don't use any of the browser types provided in the global namespace such as navigator or document. Anything outside of Angular will not be detected when serializing your application into html
  • Keep your directives stateless as much as possible. For stateful directives you may need to provide an attribute that reflects the corresponding property with an initial string value such as url in img tag. For our native <img src""> element the src attribute is reflected as the src property of the element type HTMLImageElement.

What's in a name?

We believe that using the word "universal" is correct when referring to a JavaScript Application that runs in more environments than the browser. (inspired by Universal JavaScript)

License

Apache-2.0

FAQs

Package last updated on 07 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc