Angular 2 routing redirect to with child routes

I have been the same problem. It seems an Angular tricks: If you remove leading slash in ‘redirectTo’ field, your application will be redirected successfully to auth/sign-in. Use this in app.routing: const routes: Routes = [ {path: ”, redirectTo: ‘auth’, pathMatch: ‘full’}, ]; ‘redirectTo’ value starts with a ‘/’ = absolute path ‘redirectTo’ value starts … Read more

Styling nested elements in WPF

Just to complete the original answer, I think it is clearer adding the nested style inside the parent like that: <Style x:Key=”WindowHeader” TargetType=”DockPanel” > <Setter Property=”Background” Value=”AntiqueWhite”></Setter> <Style.Resources> <Style TargetType=”Image”> <Setter Property=”Margin” Value=”6″></Setter> <Setter Property=”Width” Value=”36″></Setter> <Setter Property=”Height” Value=”36″></Setter> </Style> <Style TargetType=”TextBlock”> <Setter Property=”TextWrapping” Value=”Wrap”></Setter> </Style> </Style.Resources> </Style>

parent & child with position fixed, parent overflow:hidden bug

You could consider using CSS clip: rect(top, right, bottom, left); to clip a fixed positioned element to a parent. See demo at http://jsfiddle.net/lmeurs/jf3t0fmf/. Beware, use with care! Though the clip style is widely supported, main disadvantages are that: The parent’s position cannot be static or relative (one can use an absolutely positioned parent inside a … Read more

Loop through childNodes

The variable children is a NodeList instance and NodeLists are not true Array and therefore they do not inherit the forEach method. Also some browsers actually support it nodeList.forEach ES5 You can use slice from Array to convert the NodeList into a proper Array. var array = Array.prototype.slice.call(children); You could also simply use call to … Read more

jquery if div id has children

if ( $(‘#myfav’).children().length > 0 ) { // do something } This should work. The children() function returns a JQuery object that contains the children. So you just need to check the size and see if it has at least one child.

Best way to get child nodes

Sounds like you’re overthinking it. You’ve observed the difference between childNodes and children, which is that childNodes contains all nodes, including text nodes consisting entirely of whitespace, while children is a collection of just the child nodes that are elements. That’s really all there is to it. There is nothing unpredictable about either collection, although … Read more

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