1.2.2 • Published 9 years ago

fd-angular-core v1.2.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

fd-angular-core

Requirements

  • a Promise polyfill.

Getting started

import {bootstrap, State} from 'npm:fd-angular-core';

@State({
  template: `<p>{{ app.message }}</p>`
})
class AppController {

  constructor() {
    this.message = "Hello world!";
  }

  activate() {
    // can return a promise
  }

  attach() {

  }

  detach() {

  }

}

bootstrap(AppController); // => Promise

@Inject

@Inject('$scope')
class Foo {

  constructor($scope) {}

  @Inject('$scope')
  aMethod($scope) {}

}

$injector.superConstruct and $injector.superCall

class Foo extends Bar {

  constructor($injector) {
    $injector.superConstruct(this);
    // or:
    // $injector.superConstruct(this, locals);
  }

  aMethod($injector) {
    $injector.superCall(this, "aMethod");
    // or:
    // $injector.superCall(this, "aMethod", locals)
  }

}

@Service

@Service
// or: @Service('Foo')
class Foo {}
// this service is injectable as 'Foo'

@Controller

@Controller
// or: @Controller('Foo')
class Foo {}
// this controller is injectable as 'Foo'

@Component

@Component
// or: @Component({ ... })
class FooController {}
// this component can be used as `<foo>` or `<div foo></div>`
// and uses the `./components/foo/foo.html` template

options: restrict, scope, template, templateUrl

Set template to false to prevent the default template from being used.

1.2.2

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

2.0.0-1

9 years ago

1.1.0

9 years ago

1.0.4

9 years ago

2.0.0-0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.0

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.22

10 years ago

0.0.21

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.2

10 years ago