Share Posted March 23, 2017 Anyone have any luck with angular2 and split text. when i try and run it on a component thats part of a template it bombs out complaining about SplitText .length which to me just says its not getting the template from Angular?? export class AboutBgComponent implements AfterViewInit {private spicy = "this is my text";private mySplitText:any;constructor() {}ngAfterViewInit() {this.mySplitText = new SplitText(this.spicy, {type:"words"});console.log(this.spicy)}} tried in the constructor, tried after init as well as a bunch of other things not included in this demo. So anyone who can spin up an angular2 app and let me know? Link to comment Share on other sites More sharing options...
Author Share Posted March 24, 2017 ok I fixed it. started fresh and got it working. Link to comment Share on other sites More sharing options...
Share Posted April 30, 2018 You'll need to be a little more specific. What's the problem? The code above obviously won't work because it's targeting a string. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now