0

In my angularjs application, the partials into <ng-view> element get my form's checkbox's css changed to the default css for the user agent.

When I retrieve the checkbox directly without going through the $routeProvider I get the checkbox element rendered with my custom css. Outside the ng-view element, the checkbox elements renders just fine with the custom css.

Is there a way to render the custom css for checkbox element and not the user agent's default css for that?

skip
  • 12,193
  • 32
  • 113
  • 153
  • what you are saying cannot be the case, you will have reanalyze the sequence of events.. – harishr Jul 31 '14 at 15:42
  • Your CSS rules perhaps just didn't match, in the `ng-view` case. – okm Jul 31 '14 at 15:54
  • @HarishR: Why could it not be the case? Its simple, I have the checkbox element inside the ng-view element overridden with default css of the user agent for that. But it renders just fine outside `ng-view` element. – skip Jul 31 '14 at 15:59
  • can you share the css classes you are using.. – harishr Jul 31 '14 at 16:02
  • @HarishR: I am using uniform sexy forms with jquery at http://uniformjs.com. Could I be seeing this difference due to this plugin not initialized properly with jQuery with AngularJS? Is there a different way to initialize jQuery plugins differently when using angularjs with `ng-view`? – skip Jul 31 '14 at 16:27
  • 1
    Where is the initialization of uniform js? If it's in a directive or in a controller out of the ng-view content, the checkbox cannot be initialized after each navigation. When the path change, the ng-view content is deleted and replaced. – Polochon Jul 31 '14 at 22:30
  • Yes, the initialization was the issue. Had to do the initialization in a directive. – skip Aug 01 '14 at 07:59

0 Answers0