António Ramos | 21 Oct 15:37 2014
Picon

Angular vs Meteor

Hello i read some pro/cons about these 2 but i´m choosing meteor because it has persistence included.
With angular i´m lost and found only a simple persistence api (www.deployd.com
but deployd is somewhat DEAD!

and meteor has all of that included. I dont need to learn new stuff


I need some advice because i really like angular but dont want to waste too much time learning how to store data in the server.
And firebase is not an alternative in my case.

Regards
António

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Jens Hoffmann | 21 Oct 13:41 2014
Picon

Role of the model in angularjs

hello, 

in my application there is a rest api which gets a product object. 

{
    "Product": {
        "productId": 181124961,
        "erpNumber": "1231124",
        "price": 34.99

    }
}

My question is now is it ok to extend this model like so, or is it better to create an additional layer for that (wrapper viewmodel): 


{
    "Product": {
        "productId": 181124961,
        "erpNumber": "1231124",
        "price": 34.99,
        "_chosenOptions": {124214, 1241241}, // own properties marked with "_"
        "_selectedQuantity": 1

    }
}



best regards,

jens



--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Sander Elias | 21 Oct 09:01 2014
Picon

ng-europe

Hi,

I'm prepping to go in transit to ng-europe.
Anyone caring to meet up there?

Regards
Sander

Rudy Sanchez | 20 Oct 19:56 2014
Picon

how to add two properties to a ng-midel

Right now I have a ng-model=job.CustomerEmployeePMID.CustomerEmployeeFirstName

Which works fine. Problem is I need to include the CustomerEmployeeLastName

How can I do this?

Raif Harik | 20 Oct 18:56 2014
Picon

chat room for angular discussion

Hey, I've been working ddd/cqrs/es and found a chat room at jabbr.net.  It has been very helpful.  I was wondering if there is something similar where angular people congregate.
any thoughts?
thanks,
r

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Richard Seldon | 20 Oct 16:31 2014
Picon

How to get the URL back out of $resource?


Must be missing something very obvious here...

I have setup a new $resource declaration in a parent module, eg:

  var MerchantResource = $resource('/api/merchants/:id', {id: ' <at> id'}, {
      update: {method: 'PUT', isArray: false}
    });


and now in my child module controller I have injected that $resource as a dependency.

I wish to cache the results of the JSON get call in local storage, and for the local storage "key" I'd like it derived from the $resource URL.

But I only have a handle to MerchantResource

So, how do i query this $resource object for the URL that was originally passed to its constructor ?   (/api/merchants in the above example).

Had a quick peek at the source code: https://github.com/angular/angular.js/blob/master/src/ngResource/resource.js#L62

But could not see where the URL gets exposed - it appears to be buried inside Resource, ResourceFactory and config objects which are not exposed by the $resource object directly.

What am I missing here..?

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
deBL4ck | 20 Oct 15:28 2014
Picon

Angularjs - Access to your web server

We have a problem with Access to your web page http://code.angularjs.org/ (hosted by google cloud?) from our IP addresses pool 91.109.21.XXX. We became every time the same error response:

"Your client does not have permission to get URL / from this server (Client IP Adress: 91.109.21.XXX) Were sorry, but this service ist not available in your country"

the problem appeared about 10.10.2014, before the date everything was fine. We use your framework in our product where the process of its construction is fully automated and the inability to automatically download your library is for us a big problem Can you help us or give us a hint how to solve this problem?

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Hugo Vermaak | 20 Oct 14:35 2014
Picon

$scope updating issue

Hi all,

I have the following in my HTML markup:

<div class="row" ng-app ng-controller="clientController">
    <div class="col-md-4">
        <div class="well">
            <div class="input-prepend">
                <label for="search-box" class="add-on">
                    <i class="icon-search"></i>
                </label>
                <input id="client-search-box" class="form-control" type="text" placeholder="Search" ng-model="search.name">
             </div>
            <a class="btn btn-default" mdl-link="/client/"><i class="icon-plus"></i>Add a Client</a>
        </div>
    </div>
    <div class="col-md-8">
        <div class="well" id="client-list">
            Clients<ul>
                <li ng-repeat="client in clients | filter:search | orderBy:name">
                    <a href='/clients/{{client.id}}' title="{{client.name}}" class='resource-link'>{{client.name}} has {{ client.isActive }} </a>
                </li>
            </ul>
        </div>
    </div>
</div>

and the following in my JavaScript:

<script type="text/javascript">

        function clientController($scope, $http) {
            $http.get('/api/client.json').then(function (res) {
                var clients = res.data.result.client
                $.each(clients, function (clientKey, clientVal) {
                    $http.get('/api/client/' + clientVal.id + '/reads.json', function (readData) {
                        var reads = readData.result.client.reads;
                        if (reads.read.length > 0) {
                            var activeReads = 0;
                            $.each(reads.read, function (readKey, readVal) {
                                if (readVal.islive == "True" && readVal.isrunning == "True") {
                                    activeReads++;
                                }
                            });
                            if (activeReads > 0) {
                                clientVal["isActive"] = true;
                                clientVal["activeReads"] = activeReads;
                            } else {
                                clientVal["isActive"] = false;
                                clientVal["activeReads"] = activeReads;
                            }
                            clients.push(clientVal);
                        }
                    });
                });
                
                $scope.clients = clients;
                console.log($scope.clients); // I can see the isActive and activeReads here
            });
        }
</script>

My problem is that I cannot access the "isActive" and "activeReads" in the template, I am assuming that it has not loaded in yet, the question is how can I make it wait till the whole shebang has run before using it in my template?
I hope all this makes sense.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Joberto Diniz | 20 Oct 13:37 2014
Picon

$anchorScroll + $location.hash

In the angular example: https://code.angularjs.org/1.2.26/docs/api/ng/service/$anchorScroll when they change the location hash, the actual value in the browser doesn't change, however, when I tried to use the example, setting the $location.hash('something'), the browser url becomes mydomain.com/#!/mypage#something and I didn't want that.

How to change the $location.hash without changing the browser url?

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Sandeep Jsk | 20 Oct 12:10 2014
Picon

how to fetch data from data base using angularjs and struts with single button click

Hello every on need help I an creating web site.
My requirement is:how to fetch data from data base using angularJS and 
struts with single button click .
Is it safe to use like that and please provide me with example.

Bogdan Ionescu | 20 Oct 10:01 2014
Picon

Send object (C#) from server to angular $http

I have a SPA project with Mvc and angular.
I need to send from server an object (a tree) to an angular controller:
    
    angular.module('App').
controller('TreeMenuController', ["$scope", "$http", treeMenuController]);

    function treeMenuController($scope, $http) {
var baseUrl = "Home/GetMetadata";
var params = {};
$http.post(baseUrl, params)
.then(function (data) {
$scope.roleList = JSON.parse(data);
});
    };

roleList must be in format:

    [
{
            "roleName": "User", 
            "roleId": "role1", 
            "children": [
   { 
                    "roleName": "subUser1", 
                    "roleId": "role11", 
                    "children": [] 
                },
   {
                    "roleName": "subUser2", 
                    "roleId": "role12", 
                    "children": [
       {
                            "roleName": "subUser2-1", 
                            "roleId": "role121", 
                            "children": [
           { 
                                    "roleName": "subUser2-1-1", 
                                    "roleId": "role1211", 
                                    "children": [] 
                                },
           { 
                                    "roleName": "subUser2-1-2", 
                                    "roleId": "role1212", 
                                    "children": [] 
                               }
]
}
]
}
]
},
   { 
            "roleName": "Admin", 
            "roleId": "role2", 
            "children": [] 
        },
            "roleName": "Guest", 
            "roleId": "role3", 
            "children": [] 
        }
]

the object to send is a List<TreeMenuItem>:

    public class TreeMenuItem
{
string roleName { get; set; }
string roleId { get; set; }
List<TreeMenuItem> children { get; set; }
public TreeMenuItem(string id, string name, List<TreeMenuItem> children)
{
this.roleId = id;
this.roleName = name;
this.children = children;
}
}

the Web method (in Home controller):
    
    [HttpPost]
public List<TreeMenuItem> GetMetadata()
{
List<TreeMenuItem> itemsMenu = new List<TreeMenuItem>();
TreeMenuItem dataSource = new TreeMenuItem("1", "DataSources", null);
itemsMenu.Add(dataSource);
return itemsMenu;
}

The object send is not recognised on angular. JSON.parse throw an exception: Unexpected token S.
What I need to do?
Thanks.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Gmane