Giter VIP home page Giter VIP logo

ng-annotations's People

Contributors

pillowpillow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ng-annotations's Issues

How to pass the module name?

There seems to be an argument where you can pass the module name, but documentation doesn't say anything about it.

Problem with @attach

The current version has a problem when i try to use the decorator @attach
I receive this error in Chrome:
screen shot 2016-03-16 at 3 10 43 pm

My code is:

'use strict'
import {controller, inject, attach, autobind} from 'ng-annotations'

@controller('bTagsController')
@inject('$filter')
class BTagsController {

  @attach('$filter')
  $filter

  constructor () {
    this.items = []
    this.$filter = $filter
    this.selectedItems = []
  }

  get filteredItems() {

    var filteredByText = this.$filter('filter')(this.items, this.searchText)
    console.log(filteredByText)
    return this.$filter('filter')(filteredByText, this.isNotAdded)
  }

  add (item) {
    this.selectedItems.push(item)
    this.searchText = ''
  }

  remove ($index) {
    this.selectedItems.splice($index, 1)
  }

  @autobind
  isNotAdded (item) {
    return this.selectedItems.indexOf(item) === -1
  }

}

export {BTagsController}

With the version 0.1.12 works well

Use Typescript

It would be cool if this library gets converted to typescript

Update to babel 6

It's possible to upgrade this module to babel 6? I've forked the repo and updated babel-loader and babel-core to the 6 version but still got some troubles, all the annotations got broken and could not use ng-annotations in my project. @autoBind and @Inject annotations were not working as expected at least. I've uploaded in my fork the work done until now, the branch of my fork is called "babel-6-upload"

Stateful filter as annotation argument

Wouldn't it be slightly more elegant to have a stateful attribute on the @filter attribute instead of defining a property?

e.g.

@filter(name='...', stateful=true)

I'd raise a PR if you'd appreciate this change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.