Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cerebral/angularjs

Package Overview
Dependencies
Maintainers
5
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/angularjs - npm Package Compare versions

Comparing version 1.0.0-1504950403186 to 1.0.0-1504962746906

4

package.json
{
"name": "@cerebral/angularjs",
"version": "1.0.0-1504950403186",
"version": "1.0.0-1504962746906",
"description": "Angularjs view for Cerebral",

@@ -17,3 +17,3 @@ "main": "index.js",

"dependencies": {
"cerebral": "^2.2.0-1504950403186"
"cerebral": "^2.2.0-1504962746906"
},

@@ -20,0 +20,0 @@ "scripts": {

@@ -12,3 +12,4 @@ # @cerebral/angularjs

import angular from 'angular'
import {addModule} from '@cerebral/angularjs'
import {addModule, connect} from '@cerebral/angularjs'
import {state, signal} from 'cerebral/tags'

@@ -23,2 +24,5 @@ addModule(angular)

},
signals: {
clicked: []
},

@@ -30,2 +34,3 @@ // Special controller property to expose core

})
...
```

@@ -36,21 +41,24 @@

import angular from 'angular'
import {connect} from '@cerebral/angularjs'
import {addModule, connect} from '@cerebral/angularjs'
import {state, signal} from 'cerebral/tags'
angular.component('myComponent', {
template: '<div ng-click="click()">{{foo}}</div>',
controller: connect({
foo: state`foo`,
click: signal`clicked`
}, 'MyComponent', ['cerebral', function MyController (cerebral) {
angular.module('app', ['cerebral'])
.config(...)
.component('myComponent', {
template: '<div ng-click="$ctrl.click()">{{$ctrl.foo}}</div>',
controller: connect({
foo: state`foo`,
click: signal`clicked`
}, 'MyComponent', ['cerebral', function MyController (cerebral) {
// In some cases you might need access to cerebral's controller.
// You can inject the cerebral angular service and
// access it's controller property anywhere in your app
cerebral.controller.getSignal('mySignal')()
// In some cases you might need access to cerebral's controller.
// You can inject the cerebral angular service and
// access it's controller property anywhere in your app
cerebral.controller.getSignal('mySignal')()
// Optionally add custom behaviour to controller
}])
})
// Optionally add custom behaviour to controller
}])
})
```
Since angular doesn't expose the component name,

@@ -57,0 +65,0 @@ you will need to provide one to `connect` for the

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc