开发者社区> 镜像站> NPM> angular2-blaze-template
angular2-blaze-template
<a href="http://angular-meteor.com/"><img src="http://angular-meteor.com/images/logo-large.png" width="60" height="60" /></a> [angular2-blaze-template](http://angular-meteor.com) ======================================================
Last updated 4 years ago by dotansimha .
MIT · Original npm · Tarball · package.json
$ cnpm install angular2-blaze-template 
SYNC missed versions from official npm registry.

angular2-blaze-template

<blaze-template>

Include Blaze templates in your angular-meteor application to use Blaze templates inside your Angular 2 app.

Quick start

In the command line: $ meteor npm install angular2-blaze-template

Import and include the BlazeComponent inside you Angular 2 Component:

import {Component} from "@angular/core";
import {bootstrap} from "@angular/platform-browser-dynamic";
import {BlazeTemplate} from 'angular2-blaze-template';

@Component({
  selector: "app",
  directives: [BlazeTemplate],
  template: `<blaze-template name="MyBlazeTemplate"></blaze-template>`,
})
class Main {
  constructor() {
  }
}

bootstrap(Main);

You can include Meteor's Blaze native templates with the blaze-template directive.

<blaze-template name="todoList"></blaze-template>

You can also specify context for the Template (default context is this that created by Angular 2 Component):

<blaze-template name="App_body" [context]="mainTemplateArgs"></blaze-template>

And define mainTemplateArgs in your Angular 2 Component.

Next steps

Read more on blaze-template, using parameters and binding Blaze templates to Angular's Component in the Angular2-Meteor website.

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

2 Versions

  • 1.0.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (14)
Dependents (0)
None