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 4.0.0-1526409797341 to 4.0.0-1527015081471

2

lib/module.js

@@ -139,3 +139,3 @@ 'use strict';

controller: controller
app: controller
};

@@ -142,0 +142,0 @@ }];

{
"name": "@cerebral/angularjs",
"version": "4.0.0-1526409797341",
"version": "4.0.0-1527015081471",
"description": "Angularjs view for Cerebral",

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

"dependencies": {
"cerebral": "^5.0.0-1526409797341"
"cerebral": "^5.0.0-1527015081471"
},

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

@@ -13,23 +13,22 @@ # @cerebral/angularjs

import angular from 'angular'
import {addModule, connect} from '@cerebral/angularjs'
import {Controller} from 'cerebral'
import {state, signal} from 'cerebral/tags'
import { addModule, connect } from '@cerebral/angularjs'
import App from 'cerebral'
addModule(angular)
const rootModule = Module({
const mainModule = Module({
state: {
foo: 'bar'
},
signals: {
clicked: []
sequences: {
onClick: []
},
services: ['MyAngularService'] // Root module only. Added as providers with same name
services: ['MyAngularService'] // main module only. Added as providers with same name
})
const controller = Controller()
const app = App(mainModule)
angular.module('app', ['cerebral'])
.config(function (cerebralProvider) {
cerebralProvider.configure(controller)
cerebralProvider.configure(app)
})

@@ -43,4 +42,4 @@ ...

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

@@ -52,12 +51,12 @@ angular.module('app', ['cerebral'])

controller: connect({
foo: state`foo`,
click: signal`clicked`
foo: state.foo,
click: sequences.onClick
}, 'MyComponent', ['cerebral', function MyController (cerebral) {
// In some cases you might need access to cerebral's controller.
// In some cases you might need access to the cerebral app.
// You can inject the cerebral angular service and
// access it's controller property anywhere in your app
cerebral.controller.getSignal('mySignal')()
// access it's app property anywhere in your app
cerebral.app.getSequence('mySignal')()
// Optionally add custom behaviour to controller
// Optionally add custom behaviour to app
}])

@@ -64,0 +63,0 @@ })

Sorry, the diff of this file is not supported yet

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