AngularJS: Filter ng-options not having specific values

AngularJS NOT Filter <select ng-model=”test” ng-options=”c as c.label group by c.type for c in columns | filter:{ type : ‘!field’ } | filter:{ type : ‘!map’ }”> </select> Fiddle From the docs: “…The predicate can be negated by prefixing the string with !.” “A pattern object can be used to filter specific properties on objects … Read more

How to run a single specific test case when using protractor

Jasmine added fit and fdescribe in 2.1 for running single tests or describe blocks. http://pivotallabs.com/new-key-features-jasmine-2-1/ This feature almost made it in the 2.0 release. Now enough of this functionality is present to support fit and fdescribe for focused spec and suite running. from 2.1 git lib/jasmine-core/jasmine.js var jasmineInterface = { describe: function(description, specDefinitions) { return … Read more

Question Mark in Directive Require

It’s exactly what you guessed: ? makes a directive optional. Basically, these are at your disposal when defining directive requirements: someDirective : Require someDirective on same element and pass it to linking function ?someDirective : Pass someDirective controller if available on same element to linking function. If not, pass null. ^someDirective : Require someDirective on … Read more

Scroll to in angularjs

Angulars routing seems to pick up the change, which in my case is bad because the scrollTo reroutes me to back to the main admin page. Scrolling and then resetting the $location.hash() so angular does not perceive a change in url seems to work. $scope.scrollTo = function (id) { var old = $location.hash(); $location.hash(id); $anchorScroll(); … Read more

console.log Angular directive scope outputs “[object Object] No Properties”

The + operator calls to the toString method of the object which would return ‘[object object]’ So using log like this: console.log(‘scope is ‘ + scope); Produced the string scope is [object object] Instead use the console.log() method with commas (as commented below) to be able to drill into the scope object: console.log(‘scope is’, scope)

AngularJS BootstrapUI Typeahead with object & selection functionality

The typeahead directive from http://angular-ui.github.io/bootstrap/ is very, very flexible and there are many ways of achieving the desired functionality. I’m presenting 2 of them here. Firstly, the typeahead directive uses syntax very similar to the AngularJS select directive. This gives you full control over a displayed label and the data bound as model value. So … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)