polypack

1.0.10 • Public • Published

polypack

Polymer helper loader

import pl from 'polypack/load';
 
pl
  .start(
    '/bower/webcomponentsjs/webcomponents-loader.js',
    '/bower/polymer/polymer-element.html'
  )
  .then(() => {
    // WebComponents Ready and Polymer loaded...
    require('./app.module');
  });

angular-helpers

Frontend util for decorator-style angular 1.x using.

const angularHelpers = require('polypack/angular-helpers');
 
var ng = angularHelpers();
 
@ng.module('main')
class MainModule {
  deps = [
    'ui.router'
  ];
}
 
@ng.main.component('ui-button')
class ButtonComponent {
  template = '<button ng-click="self.open()">[[title]]</button>';
  bindings = {
    title: '@',
  };
 
  @ng.inject('$state')
  Controller ($state) {
    var self = this;
    self.$state = $state;
  }
 
  open () {
    var self = this;
    self.$state.go('/');
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i polypack

Weekly Downloads

1

Version

1.0.10

License

MIT

Last publish

Collaborators

  • teniryte