adding $state.controlledBy( controller[, state_name ]) function.
well, if you want to see if the current state is the "last valid state", that's not a parent of currently active state.
| var scrollPromise; | |
| function scrollFix ( $window, $timeout, $delegate ) { | |
| function smoothScroll() { | |
| var y = $window.scrollY; | |
| if ( y < 5 ) { | |
| $window.scrollTo( 0, 0 ); |
| [ | |
| { | |
| "note" : "note 1" | |
| }, | |
| { | |
| "note" : "note 2" | |
| } | |
| ] |
| /* global | |
| define: false | |
| */ | |
| define( function ( ) { | |
| 'use strict'; | |
| function px( cs, prop ) { | |
| return parseInt( cs.getPropertyValue( prop ) || 0, 10 ); | |
| } |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>d3 transition on nested groups</title> | |
| <body> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <script> | |
| var width = 960; |
| angular.module( 'foo', [] ) | |
| .service( 'Foo', service ) | |
| .directive( 'foo', directive ); | |
| function service() { /* ... */ } | |
| function directive() { | |
| return { | |
| controller : controller, | |
| controllerAs : 'fooCtrl', |
| gulp.task( 'templates', function () { | |
| // this is the partials.js | |
| var wrapper = require( './partials' ); | |
| return gulp.src( 'assets/partials/**/*.html' ) | |
| .pipe( $.plumber() ) | |
| .pipe( wrapper({ | |
| // this will be added to the file path (template id) | |
| root : '', | |
| // this will be stripped away from the file path (template id) |
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.1) | |
| // ---- | |
| $foo : null; | |
| $bar : false; | |
| .test { | |
| @if not $foo { |
| <snippet> | |
| <content><![CDATA[ | |
| /* global define */ | |
| define( function ( require, exports, module ) { | |
| 'use strict'; | |
| $1 | |
| }); | |
| ]]></content> |
| ( function( requirejs ) { | |
| 'use strict'; | |
| requirejs.config({ | |
| // ... config goes here | |
| }); | |
| })( typeof exports === 'object' ? { | |
| config : function ( cfg ) { | |
| 'use strict'; |