Socket
Socket
Sign inDemoInstall

angularjs-groovy

Package Overview
Dependencies
658
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angularjs-groovy

A Framework for WebView Applications in Angular


Version published
Maintainers
1
Install size
52.4 MB
Created

Readme

Source

#Create a templated application from scratch in two minutes

To address issues or request additional functionality, please use the issues tab associated with this repo. Build includes ngRoute and ngTouch modules for AngularJS. If you choose to scaffold an application that is not for web, you will be prompted to install phonegap.

##To use this framework to create a boilerplate application project, please install via NPM:

npm install [-g] angularjs-groovy

##To use this framework as a runtime JS API, please install the Bower component:

bower install angularjs-groovy --save-dev

##For CLI use:

groovy [app name] [desired location]

Follow the prompts. Your settings can then be found in the js file settings.js. Examples use the boilerplate.

Projects are built in the desired location with both Grunt and Gulp build scripts. To watch:

grunt
gulp

To build:

grunt build
gulp build

##For Runtime Use: ###Include a Groovy Settings Object:

<script type='text/javascript'>
    groovy = {
        forWeb: false,
        useLogin: false,
        header: {
            title: 'Groovy',
            color: 'Emerald Cove'
        },
        masterDetail: {
            iconUrl: 'images/appbar.nyan.svg'
        }
    };
</script>

More details on each option are included below.

###Include these files in the head of your HTML:

<script type='text/javascript'
        src='bower_components/angularjs/angular.js'>
</script>
<script type='text/javascript'
        src='bower_components/angularjs-groovy/dist/angularjs-groovy.js'>
</script>

Or wherever your Bower components install.

###Include an element where you wish your application elements to register:

<ng-view></ng-view>

###Create a module with angularjs-groovy as a dependency:

angular.module('groovyApp', [
    'angularjs-groovy'
]);

inside of your own JavaScript. Doing the above will create a templated master-detail application.

###Next you may choose to add one or many application views:

<div ng-controller='yourCtrl'
     ng-groovy-view
     ng-groovy-view-name='settings'
     ng-groovy-view-icon-url='iconUrl'
     ng-groovy-view-options='{ prependHTML: true }'>
    HTML
</div>

####Available View Types:

  • ngGroovyView
  • ngGroovyListView
  • ngGroovySettingsView
  • ngGroovyGridView

Check the examples to determine how these views appear. They can also be nested inside other views as directives.

An attribute representing options on the view is also available (similar to ngModelOptions) with the following options:

  • prependHTML: Whether view html for non-base view types should be prepended (appends by default)

####Groovy Options:

KeyTypeDefinitionDefault
appName / nstringAdds your application name to the title of the pageundefined
forWeb / fWbooleanIs this application intended to be used for the web or as a native application?true
useLogin / uLbooleanInstantiates a view for login, controlled by user referencefalse
useStylebooleanUse bootstrap/drunken pirate/groovy csstrue
header / hobjectundefined
header.titlestringApplication header contentundefined
header.colorstringOptions: 'Lagoon, Strawberry, Banana, Bruise, Emerald Cove, Nassau Sunset'undefined
header.templateUrlstringAn html file to use en lieu of the default API header templateundefined
typestringOptions: masterDetail (mD), tabbed (t), pageBased (pB), singleView (sV)'sV'
masterDetail / mDobjectundefined
masterDetail.iconUrlstringAn image file to use en lieu of the default API master detail iconundefined
masterDetail.templateUrlstringAn html file to use en lieu of the default API master detail templateundefined
tabbed / tobjectundefined
tabbed.templateUrlstringAn html file to use en lieu of the default API page based templateundefined
pageBased / pBobjectundefined
pageBased.templateUrlstringAn html file to use en lieu of the default API page based templateundefined
color / cstringOptions: 'Lagoon, Strawberry, Banana, Bruise, Emerald Cove, Nassau Sunset'undefined
debugbooleanEnables AngularJS debug statements for Groovyfalse

Keywords

FAQs

Last updated on 04 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc