Comments (8)
What steps did you take so far to include the visualizer?
npm install --save ui-router-visualizer
?
What is your build setup? Webpack bundler?
How are you require
ing the lib?
var visualizer = require("ui-router-visualizer");
?
Any other details you can provide?
The errors you posted are related to the embedded CSS files, but I thought the bundled version (visualizer.js
) would handle those automatically...
from visualizer.
I am using npm to install like you had
I am using gulp to browserify my files. Using require('ui-router-visualization');
and then in my angular module
Angular.module('app', ['ui.router', 'ui.router.visualizer']);
Is the issue that I'm using browserify?
It looks like the visualization.js is trying to require the css-loader file, which is not installed in npm. And even if I do install it with npm install css-loader
it still doesn't work.
from visualizer.
I think browserify is trying to process the hot module replacement code that webpack is generating. I removed that code from the built file and put it on a gist: https://rawgit.com/christopherthielen/ddd5e28f6a206a8812fae9b48c0ff2a2/raw/ca1a3c005393325ef8b347b7b6560ecfe05cba60/visualizer.js
Can you try downloading that file and replacing the one in node_modules with the one in my gist?
cd node_modules/ui-router-visualizer/release
rm visualizer.js
curl -O https://rawgit.com/christopherthielen/ddd5e28f6a206a8812fae9b48c0ff2a2/raw/ca1a3c005393325ef8b347b7b6560ecfe05cba60/visualizer.js
from visualizer.
It builds now. But I am now getting the following error on the app boot
im not sure if doing if(s.$$state){ return s.$$state()}
is going to achieve the desired result.
Uncaught TypeError: s.$$state is not a function(anonymous function) @ visualizer.js:310
statevis_module_1.app.service.pollStates @ visualizer.js:310
(anonymous function) @ visualizer.js:330
instantiate @ angular.js:4619
(anonymous function) @ angular.js:4459
invoke @ angular.js:4604
enforcedReturnValue @ angular.js:4443
invoke @ angular.js:4604
(anonymous function) @ angular.js:4403
getService @ angular.js:4550
injectionArgs @ angular.js:4574
invoke @ angular.js:4596
(anonymous function) @ angular.js:4412
forEach @ angular.js:321
createInjector @ angular.js:4412
doBootstrap @ angular.js:1691
angular.resumeBootstrap @ angular.js:1720
maybeBootstrap @ hint.js:569
setTimeout (async)
maybeBootstrap @ hint.js:565
from visualizer.
$$state()
landed in version ui-router 1.0.0-alpha.1... are you using alpha.1 or later?
from visualizer.
No i am using 0.2.17
, but inspecting the
from visualizer.
I think only the unnamed root state ""
is missing the $$state method (Also, if the root state is missing $$state, that's something I should fix in a later alpha)
The visualizer only works with 1.0.0 versions because it relies on the $transitions
service
from visualizer.
Gotcha. I see now that the right most state ("menu") is abstract and has the $$state.
I will migrate to 1.0.0 when I can. Thank you!
from visualizer.
Related Issues (20)
- BUG: artisanal typings require @uirouter/core when it's not a dependency of the project HOT 1
- Allow comments in the tsconfig.json file HOT 1
- Add horizontal layouts
- StateVis: current state not highlighted if vis launched after first transition
- StateVis: Collapsed nodes should animate their parent
- StateVis: Initial layout has unwanted "padding"
- Visualizer for Sticky and DSR states ? HOT 1
- Cannot read property 'isCanceled' of undefined
- 7.2.0 seems to break apps in IE11 HOT 2
- Error with Internet Explorer and .assign method HOT 2
- Display custom data properties in Transition Popover
- a bug of visualizer.d.ts for ng2
- What version of visualizer goes with angular-ur-router 1.0.0-rc.1? HOT 1
- When clicked State Visualizer dissapears HOT 1
- update dependency preact to 8.2.xx HOT 4
- Hooks not deregistering after component is destroyed HOT 1
- Action required: Greenkeeper could not be activated 🚨
- Action required: Greenkeeper could not be activated 🚨
- RADIAL_EDGE && TREE_EDGE functions fail on missing node._parent (possible fix)
- JSX element type 'ReactElement<any>' is not a constructor function for JSX elements.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visualizer.