Giter Club home page Giter Club logo

angular.haxe's People

Contributors

adrienjonquet avatar darkdarkdragon avatar frabbit avatar fullofcaffeine avatar sledorze 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

angular.haxe's Issues

wrong signature for Q create

the signature for Q create is wrong.
the signuature

public function create<T, U>(resolve : T -> Void, reject : U -> Void) : Promise<T>;

should be

public function create<T, U>(fn:(T -> Void)->(U -> Void)->Void): Promise<T>;

Organizing controllers

Hey @frabbit!

I'm wondering how you're organizing your Angular 1.x controllers when using angular.haxe? When using Angular with raw js or coffee, I just create separate files for each controller (in a app/controllers/ folder, later to be processed by an assets pipeline - webpack or maybe rails).

With angular.haxe, in the example shown in the README, you define the controller function in the main class' main function, which works but can turn into a huge mess for bigger apps.

Do you wrap those as static functions in Haxe classes?

Any hints appreciated!

ng-models only work inside a object

I'm testing this library today, and I'm using a nightly build of haxe, like is stated in the other issue.
I noticed that simple variables in ng-model isn't working, they appear empty in the controllers. They need to be something like this to work:

<input type="text" ng-model="data.entry" />

var data = {
   entry: ""    
};

scope.set("data", data);

Injection for directives?

app.directive('postRender', [ '$timeout', function($timeout) {
var def = {
    restrict : 'A', 
    terminal : true,
    transclude : true,
    link : function(scope, element, attrs) {
        $timeout(scope.resize, 0);  //Calling a scoped method
    }
};
return def;
}])

How to inject the $timeout like in the code above?

Uncaught TypeError: Object #<Object> has no method 'runDynamic'

Creating a small module using this code:

var myApp = Angular.module('myApp', []);
myApp.run(function(s:TemplateCache) {
    s.put('test', 'hahahhhhahahaha');
});

produces the following js:

myApp.runDynamic(["$templateCache",function(s) {
    s.put("test","hahahhhhahahaha");
}]);

which produces the error:
Uncaught TypeError: Object #<Object> has no method 'runDynamic'

Any clue why this is happening? Using git version of angular.haxe and angular 1.3.12.

controllerDynamic is used instead of controller

I am really looking forward to working with Haxe and Angular, but I currently have the problem that the following code:
var module = Angular.module("myModule", [])
.factory(Config.new)
.controller("AppController", appController);

Is compiled into:
var module = window.angular.module("myModule",[]).factoryDynamic("Config",[function() {
return new Config();
}]).controllerDynamic("AppController",["$scope","Config",appController]);

Even though the methods are marked with for example:
@:noCompletion @:native("controller") public function controllerDynamic (name:String, value:Dynamic):Module;

It seems the @:native is not used.
Did anyone else run into this problem?
I am using Haxe 3.1.3

Unable to run any angular.haxe project (including the samples)

I was trying to get started, when all the code I had been writing came up with runtime errors. I thought I might have been doing something wrong, so I tried compiling the sample projects. I ran into a similar problem. Sample 1 came up with a bunch of compile-time errors. Sample two compiled, and I was greeted with similar runtime errors I was getting in my own code:

TypeError: undefined is not a function (evaluating 'window.angular.module("myModule",[]).factoryDynamic("News",["Config",function(c) {
        return new News(c);
    }])')

Any ideas what's going on? I'm running Haxe 3.1.3 and running the version of Angular being loaded in the example file.

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.