1.0.5 • Published 7 years ago

angular-aurelia-adapter v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

angular-aurelia-adapter

Adapter to use Angular components and code inside an Aurelia project.

Installation

  1. Install the plugin into your project using npm

    npm install angular-aurelia-adapter
  2. (Only when using Aurelia CLI) Add the NPM module as dependency to aurelia.json.

{
  "name": "angular-aurelia-adapter",
  "path": "../node_modules/angular-aurelia-adapter/dist",
  "main": "index"
}
  1. Import the plugin using the aurelia configuration object

    export function configure(aurelia) {
      aurelia.use
        .standardConfiguration()
        // Install the plugin
        .plugin('angular-aurelia-adapter');
      aurelia.start().then(_ => _.setRoot());
    }

Using the template adapter

Since the plugin is globalized, you can use it by placing a <angularjs> custom element in any of your views:

<angularjs modules.bind="HelloWorld.id" controller.bind="HelloWorld.controller">
  <hello-world value="$ctrl.value"></hello-world>
</angularjs>

Using the template compiler

import {AngularJSCompiler} from "angular-aurelia-adapter";

AngularJSCompiler
  .create(["yourModuleIDs"])
  .compile(this.elementToCompile, this.myController);

Using the injectable function invoker

import {AngularJSCompiler} from "angular-aurelia-adapter";

AngularJSCompiler
  .create(["yourModuleIDs"])
  .invoke(($location, $timeout) => {
    $timeout(_ => {
      $location.path("/newValue");
    }, 1000);
  });
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago