{"action":"closed","issue":{"url":"https://api.github.com/repos/strongloop/grunt-loopback-sdk-angular/issues/19","labels_url":"https://api.github.com/repos/strongloop/grunt-loopback-sdk-angular/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/grunt-loopback-sdk-angular/issues/19/comments","events_url":"https://api.github.com/repos/strongloop/grunt-loopback-sdk-angular/issues/19/events","html_url":"https://github.com/strongloop/grunt-loopback-sdk-angular/issues/19","id":61707103,"number":19,"title":"Target Specific configuration","user":{"login":"pulkitsinghal","id":821963,"avatar_url":"https://avatars.githubusercontent.com/u/821963?v=3","gravatar_id":"","url":"https://api.github.com/users/pulkitsinghal","html_url":"https://github.com/pulkitsinghal","followers_url":"https://api.github.com/users/pulkitsinghal/followers","following_url":"https://api.github.com/users/pulkitsinghal/following{/other_user}","gists_url":"https://api.github.com/users/pulkitsinghal/gists{/gist_id}","starred_url":"https://api.github.com/users/pulkitsinghal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulkitsinghal/subscriptions","organizations_url":"https://api.github.com/users/pulkitsinghal/orgs","repos_url":"https://api.github.com/users/pulkitsinghal/repos","events_url":"https://api.github.com/users/pulkitsinghal/events{/privacy}","received_events_url":"https://api.github.com/users/pulkitsinghal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/grunt-loopback-sdk-angular/labels/support","name":"support","color":"3319E7"}],"state":"closed","locked":false,"assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-03-14T22:39:36Z","updated_at":"2015-03-17T00:51:36Z","closed_at":"2015-03-17T00:51:36Z","body":"The docs say that the grunt plugin can be configured like so:\r\n\r\n```\r\ngrunt.initConfig({\r\n  loopback_sdk_angular: {\r\n    options: {\r\n      // Task-specific options go here.\r\n    },\r\n    your_target: {\r\n      options: {\r\n        // Target-specific options go here.\r\n      }\r\n    },\r\n  },\r\n});\r\n```\r\n\r\nBut when I try to set it up the `staging` and `production` targets which have slightly different `apiUrl`, don't work, is there a bug or is the configuration incorrect?\r\n\r\n```\r\n    loopback_sdk_angular: {\r\n      services: { // default options?\r\n        options: {\r\n          input: './server/server.js',\r\n          output: './client/app/scripts/shoppinpal-loopback.js',\r\n          ngModuleName: 'shoppinpal-loopback',\r\n          apiUrl: 'https://' + grunt.option('subdomain') + '.localtunnel.me' + '<%= buildProperties.restApiRoot %>'\r\n        }\r\n      },\r\n      staging: {\r\n        options: {\r\n          apiUrl: '<%= buildProperties.site.baseUrl %>' + '<%= buildProperties.restApiRoot %>'\r\n        }\r\n      },\r\n      production: {\r\n        options: {\r\n          apiUrl: '<%= buildProperties.site.baseUrl %>' + '<%= buildProperties.restApiRoot %>'\r\n        }\r\n      }\r\n    },\r\n```\r\n\r\nI also don't fully understand what the deal with `services` is ... but its what came out of a working example so I stuck with it. According to the docs (http://docs.strongloop.com/display/public/LB/AngularJS+Grunt+plugin#AngularJSGruntplugin-Howtousetheplugin) there is no real reason that default options should be nested under `services` ... is there?"}}